branch: master commit 92ec03c3f10809a0bd790bca41c221215237226e Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
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