[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 35415e3 027/184: ivy-test.el (ivy-swiper-wgrep): Add test
From: |
Oleh Krehel |
Subject: |
[elpa] master 35415e3 027/184: ivy-test.el (ivy-swiper-wgrep): Add test |
Date: |
Wed, 16 Oct 2019 13:14:42 -0400 (EDT) |
branch: master
commit 35415e30c0728517555d733dd7c37d6d32bab4e7
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy-test.el (ivy-swiper-wgrep): Add test
Re #2156
---
ivy-test.el | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/ivy-test.el b/ivy-test.el
index 4dd854b..01c12c1 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1057,11 +1057,12 @@ a buffer visiting a file."
(let ((key (eval (cadr x))))
(list key (lookup-key global-map key)))))
body))))
- `(let ((temp-buffer (generate-new-buffer " *temp*")))
+ `(let ((temp-buffer (get-buffer-create " *temp*")))
(save-window-excursion
(unwind-protect
(progn
(switch-to-buffer temp-buffer)
+ (erase-buffer)
(insert ,text)
(search-backward "|")
(delete-char 1)
@@ -1235,6 +1236,24 @@ a buffer visiting a file."
("C-s" "Foo" "C-n RET")))
"Foo\nfoo|\nFOO\n")))
+(ert-deftest ivy-swiper-wgrep ()
+ (dolist (search-cmd '(swiper swiper-isearch))
+ (should
+ (string=
+ (let ((default-directory "/tmp/"))
+ (ivy-with-text
+ "|a one\na two\na three"
+ (global-set-key (kbd "C-s") search-cmd)
+ ("C-s" "a" "C-c C-o" "C-x C-q" "C-e" "1" "C-n" "2" "C-n" "C-e" "3")))
+ "-*- mode:grep; default-directory: \"/tmp/\" -*-
+
+
+3 candidates:
+./ *temp*:1:a one1
+./ *temp*:2:a two2
+./ *temp*:3:a three3|
+"))))
+
(ert-deftest swiper--isearch-format ()
(setq swiper--isearch-start-point 0)
(with-temp-buffer
- [elpa] master 0895c1a 113/184: Add key binding to allow switching directory in counsel-git-grep, (continued)
- [elpa] master 0895c1a 113/184: Add key binding to allow switching directory in counsel-git-grep, Oleh Krehel, 2019/10/16
- [elpa] master d27eb38 119/184: counsel.el (counsel-git-grep): Change args order so counsel-cd works, Oleh Krehel, 2019/10/16
- [elpa] master 582c9d4 014/184: swiper.el (swiper--candidates): Don't store line number as a string, Oleh Krehel, 2019/10/16
- [elpa] master 4a44c9e 018/184: counsel.el (counsel--async-last-error-string): Add for ease of debugging, Oleh Krehel, 2019/10/16
- [elpa] master 5e79f16 020/184: ivy.el (ivy--input): Fix point moving in TRAMP sessions, Oleh Krehel, 2019/10/16
- [elpa] master f30c6e1 022/184: swiper.el: Fix overlay faces using regex-ignore-order, Oleh Krehel, 2019/10/16
- [elpa] master 9c4cdb7 025/184: swiper.el (swiper-isearch-action): Fix for ivy-occur, Oleh Krehel, 2019/10/16
- [elpa] master ed1ba4e 028/184: Makefile (deps): Add target, Oleh Krehel, 2019/10/16
- [elpa] master b5e869e 026/184: swiper.el (swiper--occur-cands): Fix wgrep, Oleh Krehel, 2019/10/16
- [elpa] master 6928beb 031/184: ivy-test.el (ivy-read-file-name-in-buffer-visiting-file): Passes, Oleh Krehel, 2019/10/16
- [elpa] master 35415e3 027/184: ivy-test.el (ivy-swiper-wgrep): Add test,
Oleh Krehel <=
- [elpa] master fb78c3f 045/184: swiper.el: Run ispell-comments-and-strings, Oleh Krehel, 2019/10/16
- [elpa] master ae3576a 037/184: swiper.el (swiper-isearch): Fix scroll on RET, Oleh Krehel, 2019/10/16
- [elpa] master c4e0b0b 032/184: ivy-test.el (ivy-read-file-name-make-directory): Add, Oleh Krehel, 2019/10/16
- [elpa] master fdd2178 042/184: ivy.el (ivy--magic-tilde-directory): Use "~~" to move to local home, Oleh Krehel, 2019/10/16
- [elpa] master a9196a2 035/184: counsel.el (counsel-file-jump-args): Is now a list, Oleh Krehel, 2019/10/16
- [elpa] master e58231e 033/184: ivy.el (ivy-immediate-done): Fix for when "C-j" changed cwd, Oleh Krehel, 2019/10/16
- [elpa] master 0132ced 044/184: counsel.el: Run ispell-comments-and-strings, Oleh Krehel, 2019/10/16
- [elpa] master c4842ec 043/184: Fix typo: 'beggining', Oleh Krehel, 2019/10/16
- [elpa] master 28e9416 052/184: ivy.el (ivy--input): Fix for ediff, Oleh Krehel, 2019/10/16
- [elpa] master dd3e1c9 038/184: swiper.el (swiper--maybe-recenter): Refactor, Oleh Krehel, 2019/10/16