Skip to content

Commit

Permalink
Add test for valid regexp character insertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
creichert committed Jul 24, 2015
1 parent 2c18a46 commit 7e6a418
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/ido-vertical-mode-test.el
Expand Up @@ -122,3 +122,16 @@
(ido-vertical-show-count nil)
(query (ido-vertical-completions "")))
(should (string= "\n-> " (substring-no-properties query 0 4)))))


;; Test that valid regexp characters are handled properly
;;
;; Before #2c18a46, invalid regexp chars would signal an error.
;; e.g. this test would pass:
;;
;; (should-error (ido-vertical-completions "[") :type 'invalid-regexp)
;;
(ert-deftest ivm-should-allow-regexp ()
(ido-vertical-mode 1)
(let ((query (ido-vertical-completions "scratch")))
(should (string= "\n-> *Messages*\n" (substring-no-properties query 0 15)))))

0 comments on commit 7e6a418

Please sign in to comment.