summaryrefslogtreecommitdiff
path: root/test/lisp/eshell/eshell-tests.el
diff options
context:
space:
mode:
authorJim Porter <jporterbugs@gmail.com>2022-03-27 12:09:58 -0700
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-03 14:16:44 +0200
commitc12a48c3350bb5aa2cbefda10c5364c778463366 (patch)
tree23f553a42ecb9c2efb840235bbb9cd998c109cd1 /test/lisp/eshell/eshell-tests.el
parent9f521db6fec6c6dbdfeb1145f4dbb603c0240299 (diff)
downloademacs-c12a48c3350bb5aa2cbefda10c5364c778463366.tar.gz
Fix handling of '\\' inside double-quotes in Eshell
Previously, Eshell would get confused and think the following command was unterminated due to the second double-quote looking like it was escaped: echo "\\" * lisp/eshell/esh-util.el (eshell-find-delimiter): Correct docstring and treat '\' as an escapeable character when using backslash escapes. * test/lisp/eshell/eshell-tests.el (eshell-test/escape-special-quoted): Adapt test.
Diffstat (limited to 'test/lisp/eshell/eshell-tests.el')
-rw-r--r--test/lisp/eshell/eshell-tests.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index 1e303f70e5f..bcc2dc320b2 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -148,9 +148,9 @@ chars"
"Test that the backslash is not preserved for escaped special
chars"
(with-temp-eshell
- (eshell-command-result-p "echo \"h\\\\i\""
+ (eshell-command-result-p "echo \"\\\"hi\\\\\""
;; Backslashes are doubled for regexp.
- "h\\\\i\n")))
+ "\\\"hi\\\\\n")))
(ert-deftest eshell-test/command-running-p ()
"Modeline should show no command running"