]> git.eshelyaron.com Git - emacs.git/commit
; Add tests for synchronous processes in Eshell
authorJim Porter <jporterbugs@gmail.com>
Sat, 1 Apr 2023 04:32:44 +0000 (21:32 -0700)
committerJim Porter <jporterbugs@gmail.com>
Sun, 2 Apr 2023 21:15:45 +0000 (14:15 -0700)
commit00144fa287eb168c1ba8e411e43fe13b9d2732ac
tree68c09577c93c465b707666c77958c547cdbf5bb2
parent97e35b149874a105a9975853a7fcd6f0034ddeab
; Add tests for synchronous processes in Eshell

Normally, Eshell only uses synchronous processes on MS-DOS, so this is
hard to test.  To get around this, let the tests explicitly request
synchronous processes.

* lisp/eshell/esh-proc.el (eshell-supports-asynchronous-processes):
New variable...
(eshell-gather-process-output): ... use it, and remove some incorrect
code updating Eshell's internal markers (the async code path doesn't
do this, so neither should the sync path).

* lisp/eshell/esh-cmd.el (eshell-execute-pipeline): Use
'eshell-supports-asynchronous-processes'.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/emacs-command): New function.
(esh-proc-test/emacs-echo, esh-proc-test/emacs-upcase): New variables.
(esh-proc-test/synchronous-proc/simple/interactive)
(esh-proc-test/synchronous-proc/simple/command-result)
(esh-proc-test/synchronous-proc/pipeline/interactive)
(esh-proc-test/synchronous-proc/pipeline/command-result): New tests.
lisp/eshell/esh-cmd.el
lisp/eshell/esh-proc.el
test/lisp/eshell/esh-proc-tests.el