aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPhilipp Stephani2019-04-12 14:23:01 +0200
committerPhilipp Stephani2019-04-19 10:31:02 +0200
commitf5e3c2cc9820a4f7f536a29836cdde6f65230bd3 (patch)
tree708cffe53e4e7666a365eee964ae49892342f091 /test
parent74f54af2b9048cb1ea7a051c9efe079eaaeb4697 (diff)
downloademacs-f5e3c2cc9820a4f7f536a29836cdde6f65230bd3.tar.gz
emacs-f5e3c2cc9820a4f7f536a29836cdde6f65230bd3.zip
Add a new user option 'ido-big-directories'.
This provides an alternative to 'ido-max-directory-size', for directories that are statically known to be too big for Ido completion. * lisp/ido.el (ido-big-directories): New user option. (ido-directory-too-big-p): Use it. * test/lisp/ido-tests.el (ido-directory-too-big-p): New unit test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/ido-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/ido-tests.el b/test/lisp/ido-tests.el
index cb8f1d63069..c9736eb3ecf 100644
--- a/test/lisp/ido-tests.el
+++ b/test/lisp/ido-tests.el
@@ -25,6 +25,8 @@
25 25
26;;; Code: 26;;; Code:
27 27
28(require 'ido)
29
28(ert-deftest ido-tests--other-window-frame () 30(ert-deftest ido-tests--other-window-frame ()
29 "Verifies that Bug#26360 is fixed." 31 "Verifies that Bug#26360 is fixed."
30 (should-not ido-mode) 32 (should-not ido-mode)
@@ -44,4 +46,9 @@
44 (should (commandp #'ido-display-buffer-other-frame))) 46 (should (commandp #'ido-display-buffer-other-frame)))
45 (ido-mode 0))) 47 (ido-mode 0)))
46 48
49(ert-deftest ido-directory-too-big-p ()
50 (should-not (ido-directory-too-big-p "/some/dir/"))
51 (let ((ido-big-directories (cons (rx "me/di") ido-big-directories)))
52 (should (ido-directory-too-big-p "/some/dir/"))))
53
47;;; ido-tests.el ends here 54;;; ido-tests.el ends here