summaryrefslogtreecommitdiff
path: root/lisp/url/url-future.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/url/url-future.el')
-rw-r--r--lisp/url/url-future.el27
1 files changed, 0 insertions, 27 deletions
diff --git a/lisp/url/url-future.el b/lisp/url/url-future.el
index 2798f936f2..f35399469c 100644
--- a/lisp/url/url-future.el
+++ b/lisp/url/url-future.el
@@ -95,32 +95,5 @@
(signal 'error 'url-future-already-done)
(url-future-finish url-future 'cancel)))
-(ert-deftest url-future-test ()
- (let* (saver
- (text "running future")
- (good (make-url-future :value (lambda () (format text))
- :callback (lambda (f) (set 'saver f))))
- (bad (make-url-future :value (lambda () (/ 1 0))
- :errorback (lambda (&rest d) (set 'saver d))))
- (tocancel (make-url-future :value (lambda () (/ 1 0))
- :callback (lambda (f) (set 'saver f))
- :errorback (lambda (&rest d)
- (set 'saver d)))))
- (should (equal good (url-future-call good)))
- (should (equal good saver))
- (should (equal text (url-future-value good)))
- (should (url-future-completed-p good))
- (should-error (url-future-call good))
- (setq saver nil)
- (should (equal bad (url-future-call bad)))
- (should-error (url-future-call bad))
- (should (equal saver (list bad '(arith-error))))
- (should (url-future-errored-p bad))
- (setq saver nil)
- (should (equal (url-future-cancel tocancel) tocancel))
- (should-error (url-future-call tocancel))
- (should (null saver))
- (should (url-future-cancelled-p tocancel))))
-
(provide 'url-future)
;;; url-future.el ends here