aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/eshell
diff options
context:
space:
mode:
authorJim Porter2023-09-24 22:30:34 -0700
committerJim Porter2023-10-01 13:11:09 -0700
commit862e5effbf9b991af3fbbc8e31df33e64483c56f (patch)
treecf92ebb1ded1523c63e3c46dbcbeea87524d5673 /test/lisp/eshell
parent6b2219cd2744c711580cc7226554e69c8cec8247 (diff)
downloademacs-862e5effbf9b991af3fbbc8e31df33e64483c56f.tar.gz
emacs-862e5effbf9b991af3fbbc8e31df33e64483c56f.zip
; Adjust Eshell regression tests to avoid SIGPIPE
In batch mode, SIGPIPEs can cause Emacs to abort (bug#66186). * lisp/eshell/esh-io.el (eshell-output-object-to-target): Update comment. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/pipeline-connection-type/middle) (esh-proc-test/pipeline-connection-type/last): Use '(ignore)', since that causes no output when called with no arguments, thus avoiding a risky 'process-send-string'.
Diffstat (limited to 'test/lisp/eshell')
-rw-r--r--test/lisp/eshell/esh-proc-tests.el20
1 files changed, 7 insertions, 13 deletions
diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el
index d58764ac29f..9118bcd1c61 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -174,23 +174,17 @@
174pipeline." 174pipeline."
175 (skip-unless (and (executable-find "sh") 175 (skip-unless (and (executable-find "sh")
176 (executable-find "cat"))) 176 (executable-find "cat")))
177 ;; An `eshell-pipe-broken' signal might occur internally; let Eshell 177 (eshell-command-result-equal
178 ;; handle it! 178 (concat "(ignore) | " esh-proc-test--detect-pty-cmd " | cat")
179 (let ((debug-on-error nil)) 179 nil))
180 (eshell-command-result-equal
181 (concat "echo hi | " esh-proc-test--detect-pty-cmd " | cat")
182 nil)))
183 180
184(ert-deftest esh-proc-test/pipeline-connection-type/last () 181(ert-deftest esh-proc-test/pipeline-connection-type/last ()
185 "Test that only output streams are PTYs when a command ends a pipeline." 182 "Test that only output streams are PTYs when a command ends a pipeline."
186 (skip-unless (executable-find "sh")) 183 (skip-unless (executable-find "sh"))
187 ;; An `eshell-pipe-broken' signal might occur internally; let Eshell 184 (eshell-command-result-equal
188 ;; handle it! 185 (concat "(ignore) | " esh-proc-test--detect-pty-cmd)
189 (let ((debug-on-error nil)) 186 (unless (eq system-type 'windows-nt)
190 (eshell-command-result-equal 187 "stdout\nstderr\n")))
191 (concat "echo hi | " esh-proc-test--detect-pty-cmd)
192 (unless (eq system-type 'windows-nt)
193 "stdout\nstderr\n"))))
194 188
195 189
196;; Synchronous processes 190;; Synchronous processes