branch: externals/ivy-hydra
commit eeb14b11f97dffc8161385ec823d63585f818143
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy-test.el (ivy-read-history): Add a test
Re #2524
---
ivy-test.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ivy-test.el b/ivy-test.el
index 92b57c3..fa07721 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -187,6 +187,15 @@ Since `execute-kbd-macro' doesn't pick up a let-bound
`default-directory'.")
"C-m")
"one")))
+(ert-deftest ivy-read-history ()
+ (defvar ivy-read-hist '("c" "b" "a"))
+ (should
+ (equal
+ (let ((hist ))
+ (ivy-with '(ivy-read "test: " '("c" "d") :history 'ivy-read-hist) "RET")
+ ivy-read-hist)
+ '("c" "b" "a"))))
+
(ert-deftest ivy-read-sort-alist ()
(should (equal (ivy-with '(let ((coll '(("b" . "1") ("a" . "2"))))
(ivy-read "test:" coll