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

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

[elpa] master 92ec03c 163/399: ivy-test.el (ivy-use-selectable-prompt):


From: Oleh Krehel
Subject: [elpa] master 92ec03c 163/399: ivy-test.el (ivy-use-selectable-prompt): Add tests
Date: Sat, 20 Jul 2019 14:57:15 -0400 (EDT)

branch: master
commit 92ec03c3f10809a0bd790bca41c221215237226e
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy-test.el (ivy-use-selectable-prompt): Add tests
    
    Re #1924
---
 ivy-test.el | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/ivy-test.el b/ivy-test.el
index 30d76e2..fa03907 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1056,6 +1056,21 @@ a buffer visiting a file."
      ("C-s" "de" "" "RET"))
     "abc\nasd|f123 def\ndem")))
 
+(ert-deftest ivy-use-selectable-prompt ()
+  (let ((ivy-use-selectable-prompt t)
+        (completing-read-function #'ivy-completing-read))
+    (should (string= (ivy-with '(ivy-read "prompt: " '("foo" "bar")
+                                 :require-match t)
+                               "C-p C-m")
+                     "foo"))
+    (should (string= (ivy-with '(ivy-read "prompt: " '("" "foo" "bar")
+                                 :require-match t)
+                               "C-p C-m")
+                     ""))
+    (should (string= (ivy-with '(completing-read "Position: " '(("") ("t") 
("b")) nil t)
+                               "C-p C-m")
+                     ""))))
+
 (provide 'ivy-test)
 
 ;;; ivy-test.el ends here



reply via email to

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