emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a9af70849d2: Add a couple of minibuffer completion tests


From: Eshel Yaron
Subject: master a9af70849d2: Add a couple of minibuffer completion tests
Date: Wed, 29 May 2024 06:01:53 -0400 (EDT)

branch: master
commit a9af70849d2d9ad2b6d2b81ba4ef4d4342bff6d8
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    Add a couple of minibuffer completion tests
    
    Add tests for regressions that followed commit ff3f17ca3cd.
    
    See discussion here:
    https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html
    
    * test/lisp/minibuffer-tests.el (completion-cycle)
    (minibuffer-next-completion): New tests.
---
 test/lisp/minibuffer-tests.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el
index c4a7de9e51f..df36bce4634 100644
--- a/test/lisp/minibuffer-tests.el
+++ b/test/lisp/minibuffer-tests.el
@@ -630,5 +630,18 @@
       (previous-line-completion 7)
       (should (equal "aa1" (get-text-property (point) 'completion--string))))))
 
+(ert-deftest completion-cycle ()
+  (completing-read-with-minibuffer-setup '("aaa" "bbb" "ccc")
+    (let ((completion-cycle-threshold t))
+      (execute-kbd-macro (kbd "TAB TAB TAB"))
+      (should (equal (minibuffer-contents) "ccc")))))
+
+(ert-deftest minibuffer-next-completion ()
+  (let ((default-directory (ert-resource-directory)))
+    (completing-read-with-minibuffer-setup #'read-file-name-internal
+      (insert "d/")
+      (execute-kbd-macro (kbd "M-<down> M-<down> M-<down>"))
+      (should (equal "data/minibuffer-test-cttq$$tion" 
(minibuffer-contents))))))
+
 (provide 'minibuffer-tests)
 ;;; minibuffer-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]