[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7e73580 171/399: ivy-test.el (counsel-find-file-with-dolla
From: |
Oleh Krehel |
Subject: |
[elpa] master 7e73580 171/399: ivy-test.el (counsel-find-file-with-dollars): Add test |
Date: |
Sat, 20 Jul 2019 14:57:17 -0400 (EDT) |
branch: master
commit 7e735808e966d70340b5a2cef0430f913151d9b6
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy-test.el (counsel-find-file-with-dollars): Add test
Re #2012
---
ivy-test.el | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/ivy-test.el b/ivy-test.el
index fa03907..20daa9d 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -48,13 +48,17 @@
(global-set-key (kbd "C-c e") 'ivy-eval)
-(defun ivy-with (expr keys)
+(cl-defun ivy-with (expr keys &key dir)
"Evaluate EXPR followed by KEYS."
(let ((ivy-expr expr)
(inhibit-message t))
- (execute-kbd-macro
- (vconcat (kbd "C-c e")
- (kbd keys)))
+ (save-window-excursion
+ ;; `execute-kbd-macro' doesn't pick up `default-directory'
+ (when dir
+ (dired (expand-file-name dir (counsel-locate-git-root))))
+ (execute-kbd-macro
+ (vconcat (kbd "C-c e")
+ (kbd keys))))
ivy-result))
(defun command-execute-setting-this-command (cmd &rest args)
@@ -1071,6 +1075,16 @@ a buffer visiting a file."
"C-p C-m")
""))))
+(unless (file-exists-p "test")
+ (shell-command "git clone -b test --single-branch
https://github.com/abo-abo/swiper/ test"))
+
+(ert-deftest counsel-find-file-with-dollars ()
+ (should (string=
+ (file-relative-name
+ (ivy-with '(counsel-find-file) "fo C-m"
+ :dir "test/find-file/files-with-dollar/"))
+ "test/find-file/files-with-dollar/foo$")))
+
(provide 'ivy-test)
;;; ivy-test.el ends here
- [elpa] master 5458f93 169/399: ivy.el (ivy--filter): Avoid a filter on empty input, (continued)
- [elpa] master 5458f93 169/399: ivy.el (ivy--filter): Avoid a filter on empty input, Oleh Krehel, 2019/07/20
- [elpa] master 9c53320 174/399: swiper.el (swiper-isearch-function): Fix for strings with trailing \|, Oleh Krehel, 2019/07/20
- [elpa] master ce0a1f1 172/399: ivy.el (ivy--filter): Fix matcher not called on input "", Oleh Krehel, 2019/07/20
- [elpa] master 39759cf 180/399: ivy-test.el (ivy-with): Save current buffer, Oleh Krehel, 2019/07/20
- [elpa] master fa87b97 182/399: ivy-test.el: Print version, Oleh Krehel, 2019/07/20
- [elpa] master 8482f62 179/399: swiper.el (swiper-isearch-function): Fix str is " ", Oleh Krehel, 2019/07/20
- [elpa] master 482088c 178/399: swiper.el (swiper--avy-candidates): Fix for swiper-background-faces, Oleh Krehel, 2019/07/20
- [elpa] master 0e62f0d 185/399: counsel.el (counsel-switch-buffer-other-window): Update prompt, Oleh Krehel, 2019/07/20
- [elpa] master 5115df3 184/399: counsel.el: counsel-switch-buffer-other-window: new command., Oleh Krehel, 2019/07/20
- [elpa] master 0a12708 164/399: swiper.el: Add swiper background faces, Oleh Krehel, 2019/07/20
- [elpa] master 7e73580 171/399: ivy-test.el (counsel-find-file-with-dollars): Add test,
Oleh Krehel <=
- [elpa] master c47a7dc 176/399: ivy.el (ivy--filter): Don't cache if the result of matching cache is empty, Oleh Krehel, 2019/07/20
- [elpa] master 4171364 183/399: ivy-test.el (counsel-find-file-with-dotfiles): Disable for emacs27, Oleh Krehel, 2019/07/20
- [elpa] master d829338 190/399: counsel.el (counsel-recentf): Require match, Oleh Krehel, 2019/07/20
- [elpa] master 39f5c24 187/399: ivy-test.el: Use :expected-result, Oleh Krehel, 2019/07/20
- [elpa] master a9f9e41 189/399: Add counsel-descbinds-action-exec, Oleh Krehel, 2019/07/20
- [elpa] master 80d9c17 188/399: Makefile: Clone tests/ if needed, Oleh Krehel, 2019/07/20
- [elpa] master 6516265 192/399: ivy-overlay.el: Do not assume in-buffer completion, Oleh Krehel, 2019/07/20
- [elpa] master 6263d04 193/399: counsel.el (counsel-find-file): Improve mkdir action with ivy-call, Oleh Krehel, 2019/07/20
- [elpa] master 31e57e7 181/399: ivy-test.el (counsel-find-file-with-dotfiles): Disable for older Emacs, Oleh Krehel, 2019/07/20
- [elpa] master f52b0ac 175/399: ivy.el (ivy--filter): Don't cache if ivy--old-cands is empty, Oleh Krehel, 2019/07/20