Browse Source

Add test for cons style INITIAL-INPUT

Ryan C. Thompson 7 years ago
parent
commit
9c3fd68662
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tests/test-ido-completing-read+.el

+ 6 - 0
tests/test-ido-completing-read+.el

@@ -215,6 +215,12 @@ also accept a quoted list for the sake of convenience."
          (ido-completing-read+ "Prompt: " '("blue" "yellow" "green") nil nil "gr"))
          (ido-completing-read+ "Prompt: " '("blue" "yellow" "green") nil nil "gr"))
        :to-equal "green"))
        :to-equal "green"))
 
 
+    (it "should properly handle a cons INITIAL-INPUT"
+      (expect
+       (with-simulated-input "ee RET"
+         (ido-completing-read+ "Prompt: " '("blue" "yellow" "green") nil nil (cons "gr" 2)))
+       :to-equal "green"))
+
     (it "should properly handle both INITIAL-INPUT and DEF at the same time"
     (it "should properly handle both INITIAL-INPUT and DEF at the same time"
       (expect
       (expect
        (with-simulated-input "RET"
        (with-simulated-input "RET"