summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordickmao <none>2021-08-06 13:29:31 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-08-06 13:29:31 +0200
commitc18bfbe6e452bfbef276fc8325bdbfc6c7e0d61b (patch)
tree208215944312ad0b455d9ba34f072a61fde9e5f3 /test
parent93e1248c2085dfb675d7ed916ec5621e3fe6e2c6 (diff)
downloademacs-c18bfbe6e452bfbef276fc8325bdbfc6c7e0d61b.tar.gz
Improve ffap-ido-mode test
* test/lisp/ffap-tests.el (ffap-ido-mode): Actually test `ido-everywhere' at run time, not compile time (bug#49895).
Diffstat (limited to 'test')
-rw-r--r--test/lisp/ffap-tests.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 4fb4c90e76d..f8113bffc1a 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -127,13 +127,17 @@ left alone when opening a URL in an external browser."
(require 'ido)
(with-temp-buffer
(let ((ido-mode t)
- (read-filename-function read-file-name-function)
+ (read-file-name-function read-file-name-function)
(read-buffer-function read-buffer-function))
- (ido-everywhere)
+ ;; Says ert-deftest:
+ ;; Macros in BODY are expanded when the test is defined, not when it
+ ;; is run. If a macro (possibly with side effects) is to be tested,
+ ;; it has to be wrapped in `(eval (quote ...))'.
+ (eval (quote (ido-everywhere)))
(let ((read-file-name-function (lambda (&rest args)
- (expand-file-name
- (nth 4 args)
- (nth 1 args)))))
+ (expand-file-name
+ (nth 4 args)
+ (nth 1 args)))))
(save-excursion (insert "ffap-tests.el"))
(let (kill-buffer-query-functions)
(kill-buffer (call-interactively #'find-file-at-point)))))))