emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/popup 487c0a8 109/184: add :initial-index parameter test


From: ELPA Syncer
Subject: [nongnu] elpa/popup 487c0a8 109/184: add :initial-index parameter test
Date: Wed, 6 Oct 2021 00:01:22 -0400 (EDT)

branch: elpa/popup
commit 487c0a8ad34799161e0e9c026633a8d6e5ebf219
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    add :initial-index parameter test
---
 tests/popup-test.el | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/popup-test.el b/tests/popup-test.el
index 9153117..bfc19c7 100644
--- a/tests/popup-test.el
+++ b/tests/popup-test.el
@@ -618,6 +618,23 @@ Qux" :nowait t)
    ;; Qux"))
    ))
 
+(ert-deftest popup-test-initial-index ()
+  (popup-test-with-common-setup
+    (setq popup (popup-menu* '("Foo" "Bar" "Baz") :initial-index 0 :nowait t))
+    (should (popup-test-helper-popup-selected-item "Foo")))
+
+  (popup-test-with-common-setup
+    (setq popup (popup-menu* '("Foo" "Bar" "Baz") :initial-index 2 :nowait t))
+    (should (popup-test-helper-popup-selected-item "Baz")))
+
+  (popup-test-with-common-setup
+    (setq popup (popup-menu* '("Foo" "Bar" "Baz") :initial-index -1 :nowait t))
+    (should (popup-test-helper-popup-selected-item "Foo")))
+
+  (popup-test-with-common-setup
+    (setq popup (popup-menu* '("Foo" "Bar" "Baz") :initial-index 100 :nowait 
t))
+    (should (popup-test-helper-popup-selected-item "Baz"))))
+
 (defun popup-test-helper-input (key)
   (push key unread-command-events))
 



reply via email to

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