aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
diff options
context:
space:
mode:
authorBrian Leung <leungbk@posteo.net>2022-02-10 00:59:02 -0800
committerTom Dalziel <33435574+tomdl89@users.noreply.github.com>2022-02-14 00:00:33 +0100
commite7c019291bb2746fc8243e140dc95229728aee50 (patch)
tree7265a14ef1442bb05d9db8735038980a1b7544fe /evil-tests.el
parent0646631de42db7f93c002d4430191f86f7718b63 (diff)
evil-read: Perform % and # substitutions for shell cmds
Diffstat (limited to 'evil-tests.el')
-rw-r--r--evil-tests.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/evil-tests.el b/evil-tests.el
index 73eed9e..eb638cf 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -8137,6 +8137,18 @@ maybe we need one line more with some text\n")
"[l]line 1\nline 2"
(":read!echo cmd line 1" [return])
"line 1\n[c]md line 1\nline 2")))
+ (ert-info ("Test substitution of % in shell commands")
+ (evil-with-temp-file name
+ "3\n2\n1\n"
+ (evil-test-buffer
+ ((vconcat ":e " name [return]))
+ "[3]\n2\n1\n"
+ ((vconcat ":read !echo %" [return]))
+ ((vconcat ":w " [return]))
+ (file name (concat "3\n"
+ (buffer-file-name) "\n"
+ "2\n"
+ "1\n")))))
(ert-info ("Test insertion of shell command without trailing newline")
(ert-info ("with space")
(evil-test-buffer