1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -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."
(with-temp-eshell (let ((text-quoting-style 'grave))
(eshell-match-command-output "echo hi & &" (with-temp-eshell
"\\`Empty command before `&'\n") (eshell-match-command-output "echo hi & &"
;; Make sure the next Eshell prompt has the original input so the "\\`Empty command before `&'\n")
;; user can fix it. ;; Make sure the next Eshell prompt has the original input so the
(should (equal (buffer-substring eshell-last-output-end (point)) ;; user can fix it.
"echo hi & &")))) (should (equal (buffer-substring eshell-last-output-end (point))
"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."