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

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

[elpa] master 80db2cc 142/348: ivy-test.el (ivy-read-preselect): New tes


From: Oleh Krehel
Subject: [elpa] master 80db2cc 142/348: ivy-test.el (ivy-read-preselect): New test
Date: Sat, 8 Apr 2017 11:03:44 -0400 (EDT)

branch: master
commit 80db2cc8f1c55708d4bb5a1bf1655019d7c010c5
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy-test.el (ivy-read-preselect): New test
---
 ivy-test.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/ivy-test.el b/ivy-test.el
index 09b341a..f49982c 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -408,4 +408,20 @@
   (should (not (ivy-re-match '(("counsel" . nil) ("defun" . t)) "(defun 
counsel")))
   (should (not (ivy-re-match '(("defun" . t) ("counsel" . nil)) "(defun 
counsel"))))
 
+(ert-deftest ivy-read-preselect ()
+  (should (equal
+           (ivy-with
+            '(ivy-read "test: "
+              (list "abc" "default" "def")
+              :preselect 1)
+            "RET")
+           "default"))
+  (should (equal
+           (ivy-with
+            '(ivy-read "test: "
+              (list "abc" "default" "def")
+              :preselect "defa")
+            "RET")
+           "default")))
+
 (provide 'ivy-test)



reply via email to

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