branch: master
commit c5ea5dffdc3690cc8a76ff33ad1af2cf264be293
Author: Ryan C. Thompson <[email protected]>
Commit: Ryan C. Thompson <[email protected]>
Add a test for new default behavior
---
ivy-test.el | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/ivy-test.el b/ivy-test.el
index 2c167a2..9360b6fe 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -518,6 +518,24 @@
"bl C-p C-M-j")
"bl"))))
+(ert-deftest ivy-completing-read-default ()
+ (should
+ (equal "b"
+ (ivy-with '(ivy-completing-read "Pick: " '("a" "b" "c") nil t nil
nil "b")
+ "RET")))
+ (should
+ (equal "d"
+ (ivy-with '(ivy-completing-read "Pick: " '("a" "b" "c") nil t nil
nil "d")
+ "RET")))
+ (should
+ (equal "e"
+ (ivy-with '(ivy-completing-read "Pick: " '("a" "b" "c") nil t nil
nil '("e" "b"))
+ "RET")))
+ (should
+ (equal ""
+ (ivy-with '(ivy-completing-read "Pick: " '("a" "b" "c") nil t nil
nil nil)
+ "RET"))))
+
(provide 'ivy-test)
;;; ivy-test.el ends here