emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master bed783e 217/399: ivy-test.el (swiper-isearch-case-fold): A


From: Oleh Krehel
Subject: [elpa] master bed783e 217/399: ivy-test.el (swiper-isearch-case-fold): Add test
Date: Sat, 20 Jul 2019 14:57:26 -0400 (EDT)

branch: master
commit bed783e3e5332ce05b926397d89df07252df866b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy-test.el (swiper-isearch-case-fold): Add test
    
    Re #2039
---
 ivy-test.el | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/ivy-test.el b/ivy-test.el
index c7cf9b6..8f86b89 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1080,6 +1080,31 @@ a buffer visiting a file."
      ("C-s" "defun\\|defvar" "C-n RET"))
     "(defun foo)\nasdf\n(defvar| bar)")))
 
+(ert-deftest swiper-isearch-case-fold ()
+  (should
+   (string=
+    (ivy-with-text
+     "|Foo\nfoo\nFOO\n"
+     (global-set-key (kbd "C-s") #'swiper-isearch)
+     ("C-s" "foo" "C-n RET"))
+    "Foo\nfoo|\nFOO\n"))
+  (should
+   (string=
+    (let ((ivy-case-fold-search-default 'auto))
+      (ivy-with-text
+       "|Foo\nfoo\nFOO\n"
+       (global-set-key (kbd "C-s") #'swiper-isearch)
+       ("C-s" "Foo" "C-n RET")))
+    "Foo|\nfoo\nFOO\n"))
+  (should
+   (string=
+    (let ((ivy-case-fold-search-default t))
+      (ivy-with-text
+       "|Foo\nfoo\nFOO\n"
+       (global-set-key (kbd "C-s") #'swiper-isearch)
+       ("C-s" "Foo" "C-n RET")))
+    "Foo\nfoo|\nFOO\n")))
+
 (ert-deftest ivy-use-selectable-prompt ()
   (let ((ivy-use-selectable-prompt t)
         (completing-read-function #'ivy-completing-read))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]