branch: externals/ivy-hydra
commit edefba76f11287588a53c3761ffeb7afaa63bdb7
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy-test.el (ivy-read-alist-multi-cands): Add test
Re #2568
---
ivy-test.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/ivy-test.el b/ivy-test.el
index 88243cf..9796851 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -219,7 +219,20 @@ Since `execute-kbd-macro' doesn't pick up a let-bound
`default-directory'.")
acc)
"M-a RET")
'(("Key 2" . "Data 2")
- ("Key 1" . "Data 1")))))
+ ("Key 1" . "Data 1"))))
+ (should
+ (equal
+ (ivy-with
+ '(let (res)
+ (ivy-read "test: "
+ '(("Key 1" . "Data 1") ("Key 2" . "Data 2"))
+ :action (lambda (x) (push x res))
+ :multi-action (lambda (xs) (setq res xs)))
+
+ res)
+ "M-a RET")
+ '(("Key 1" . "Data 1")
+ ("Key 2" . "Data 2")))))
(ert-deftest ivy-read-sort-def ()
(should (equal (ivy-with '(ivy-read "Test: " '("1" "2") :def '("a" "b" "c"))