aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/process-tests.el
diff options
context:
space:
mode:
authorPhilipp Stephani2018-04-04 12:14:56 +0200
committerPhilipp Stephani2018-04-07 22:15:42 +0200
commit8df23a82042fa7dbaaa4377bc376d705595b073f (patch)
tree707eaddc19a76a72c39ae0481c8eea7ac93dda31 /test/src/process-tests.el
parent55525480780d34b2f968739249685d0c9e9a063f (diff)
downloademacs-8df23a82042fa7dbaaa4377bc376d705595b073f.tar.gz
emacs-8df23a82042fa7dbaaa4377bc376d705595b073f.zip
Document that 'make-process' mixes the output streams
* doc/lispref/processes.texi (Asynchronous Processes): * src/process.c (Fmake_process): Document that standard error is mixed with standard output if STDERR is nil. * test/src/process-tests.el (make-process/mix-stderr): New unit test.
Diffstat (limited to 'test/src/process-tests.el')
-rw-r--r--test/src/process-tests.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index 7d355602297..849676ea8f0 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -181,5 +181,23 @@
181 (should-not (process-query-on-exit-flag process)))) 181 (should-not (process-query-on-exit-flag process))))
182 (kill-process process))))) 182 (kill-process process)))))
183 183
184(ert-deftest make-process/mix-stderr ()
185 "Check that ‘make-process’ mixes the output streams if STDERR is nil."
186 (skip-unless (executable-find shell-file-name))
187 (with-temp-buffer
188 (let ((process (make-process
189 :name "mix-stderr"
190 :command (list shell-file-name shell-command-switch
191 "echo stdout && echo stderr >&2")
192 :buffer (current-buffer)
193 :sentinel #'ignore
194 :noquery t
195 :connection-type 'pipe)))
196 (while (process-live-p process)
197 (accept-process-output process))
198 (should (eq (process-status process) 'exit))
199 (should (eq (process-exit-status process) 0))
200 (should (equal (buffer-string) "stdout\nstderr\n")))))
201
184(provide 'process-tests) 202(provide 'process-tests)
185;; process-tests.el ends here. 203;; process-tests.el ends here.