1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Fix recently added eshell test

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/empty-background-command): Fix failing test.
This commit is contained in:
Stefan Kangas 2024-06-10 22:17:35 +02:00
parent 7c97d05b56
commit 37a715c609

View file

@ -507,13 +507,14 @@ NAME is the name of the test case."
(ert-deftest esh-cmd-test/empty-background-command () (ert-deftest esh-cmd-test/empty-background-command ()
"Test that Eshell reports an error when trying to background a nil command." "Test that Eshell reports an error when trying to background a nil command."
(let ((text-quoting-style 'grave))
(with-temp-eshell (with-temp-eshell
(eshell-match-command-output "echo hi & &" (eshell-match-command-output "echo hi & &"
"\\`Empty command before `&'\n") "\\`Empty command before `&'\n")
;; Make sure the next Eshell prompt has the original input so the ;; Make sure the next Eshell prompt has the original input so the
;; user can fix it. ;; user can fix it.
(should (equal (buffer-substring eshell-last-output-end (point)) (should (equal (buffer-substring eshell-last-output-end (point))
"echo hi & &")))) "echo hi & &")))))
(ert-deftest esh-cmd-test/throw () (ert-deftest esh-cmd-test/throw ()
"Test that calling `throw' as an Eshell command unwinds everything properly." "Test that calling `throw' as an Eshell command unwinds everything properly."