summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Smith <Morgan.J.Smith@outlook.com>2023-06-06 15:02:57 -0400
committerEli Zaretskii <eliz@gnu.org>2023-06-10 20:53:01 +0300
commit90047c38ce98af4ac7d0fa9d59ba0d668e4ae902 (patch)
tree630ee23929bd42a18fc2786fc726a68c51bd742b
parent2c623e4feb9e141715a4959655f894c335ca3668 (diff)
downloademacs-90047c38ce98af4ac7d0fa9d59ba0d668e4ae902.tar.gz
Add test for when 'completion-auto-help' is 'visible'
* test/lisp/minibuffer-tests.el (completion-auto-help-test): Add test for when 'completion-auto-help' is 'visible'. Also test for successful completion message. (Bug#63913)
-rw-r--r--test/lisp/minibuffer-tests.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el
index 1de8e56cbd4..a67fc555772 100644
--- a/test/lisp/minibuffer-tests.el
+++ b/test/lisp/minibuffer-tests.el
@@ -353,12 +353,23 @@
'("a" "ab" "ac")
(execute-kbd-macro (kbd "a TAB TAB"))
(should (equal (car messages) "Complete, but not unique"))
- (should-not (get-buffer-window "*Completions*" 0))))
+ (should-not (get-buffer-window "*Completions*" 0))
+ (execute-kbd-macro (kbd "b TAB"))
+ (should (equal (car messages) "Sole completion"))))
(let ((completion-auto-help t))
(completing-read-with-minibuffer-setup
'("a" "ab" "ac")
(execute-kbd-macro (kbd "a TAB TAB"))
- (should (get-buffer-window "*Completions*" 0)))))))
+ (should (get-buffer-window "*Completions*" 0))
+ (execute-kbd-macro (kbd "b TAB"))
+ (should (equal (car messages) "Sole completion"))))
+ (let ((completion-auto-help 'visible))
+ (completing-read-with-minibuffer-setup
+ '("a" "ab" "ac" "achoo")
+ (execute-kbd-macro (kbd "a TAB TAB"))
+ (should (get-buffer-window "*Completions*" 0))
+ (execute-kbd-macro (kbd "ch TAB"))
+ (should (equal (car messages) "Sole completion")))))))
(ert-deftest completion-auto-select-test ()
(let ((completion-auto-select t))