diff options
Diffstat (limited to 'test/lisp/eshell/esh-proc-tests.el')
-rw-r--r-- | test/lisp/eshell/esh-proc-tests.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el index 643cb8b125a..85b02845ab3 100644 --- a/test/lisp/eshell/esh-proc-tests.el +++ b/test/lisp/eshell/esh-proc-tests.el @@ -45,6 +45,8 @@ "'") "A shell command that prints the standard streams connected as TTYs.") +(defvar eshell-test-value nil) + ;;; Tests: @@ -130,6 +132,20 @@ (should (= eshell-last-command-status 1)) (should (eq eshell-last-command-result nil))))) +(ert-deftest esh-proc-test/sentinel/change-buffer () + "Check that changing the current buffer while running a command works. +See bug#71778." + (eshell-with-temp-buffer bufname "" + (with-temp-eshell + (let (eshell-test-value) + (eshell-insert-command + (concat (format "for i in 1 2 {sleep 1; echo hello} > #<%s>; " bufname) + "setq eshell-test-value t")) + (with-current-buffer bufname + (eshell-wait-for (lambda () eshell-test-value)) + (should (equal (buffer-string) "hellohello"))) + (eshell-match-command-output "echo goodbye" "\\`goodbye\n"))))) + ;; Pipelines |