summaryrefslogtreecommitdiff
path: root/test/lisp/eshell/eshell-tests.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-02 16:08:41 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-02 16:08:41 +0200
commit02ef00d89c64d713f29f4ed12dbcae9f8d31bb9a (patch)
tree6ab04d444de9548c34af9aa36e94e4c6447bbbc5 /test/lisp/eshell/eshell-tests.el
parent6dc4e3b95ca9589f24530979cdc83ea346d1ca45 (diff)
downloademacs-02ef00d89c64d713f29f4ed12dbcae9f8d31bb9a.tar.gz
em-extpipe: Catch eshell-incomplete thrown while parsing
* lisp/eshell/em-extpipe.el (em-extpipe--or-with-catch): New macro. (eshell-parse-external-pipeline): Use new macro to treat `eshell-incomplete' as a failure of the parse function to move us forward (Bug#54603). Thanks to Jim Porter <jporterbugs@gmail.com> for the report and for help isolating the problem. * test/lisp/eshell/eshell-tests.el (eshell-test/lisp-command-with-quote): New test for Bug#54603, thanks to Jim Porter <jporterbugs@gmail.com> (bug#54603).
Diffstat (limited to 'test/lisp/eshell/eshell-tests.el')
-rw-r--r--test/lisp/eshell/eshell-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index e31db07c619..1e303f70e5f 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -44,6 +44,10 @@
"Test `eshell-command-result' with an elisp command."
(should (equal (eshell-test-command-result "(+ 1 2)") 3)))
+(ert-deftest eshell-test/lisp-command-with-quote ()
+ "Test `eshell-command-result' with an elisp command containing a quote."
+ (should (equal (eshell-test-command-result "(eq 'foo nil)") nil)))
+
(ert-deftest eshell-test/for-loop ()
"Test `eshell-command-result' with a for loop.."
(let ((process-environment (cons "foo" process-environment)))