1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

; Make sure 'eshell-command' tests don't prompt the user

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background)
(eshell-test/eshell-command/background-pipeline): Wait for the process
to finish.
This commit is contained in:
Jim Porter 2023-04-01 10:28:02 -07:00
parent b39c3cd112
commit 89e337c3fc

View File

@ -136,6 +136,8 @@ This test uses a pipeline for the command."
;; buffer.
(eshell-command "*echo hi &")
(with-current-buffer "*Eshell Async Command Output*"
(while (get-buffer-process (current-buffer))
(accept-process-output))
(goto-char (point-min))
(should (looking-at "\\[echo\\(\\.exe\\)?\\(<[0-9]+>\\)?\\]"))))))
@ -149,6 +151,8 @@ This test uses a pipeline for the command."
;; XXX: As above, we can't write to the current buffer here.
(eshell-command "*echo hi | *cat &")
(with-current-buffer "*Eshell Async Command Output*"
(while (get-buffer-process (current-buffer))
(accept-process-output))
(goto-char (point-min))
(should (looking-at "\\[cat\\(\\.exe\\)?\\(<[0-9]+>\\)?\\]"))))))