1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 22:40:46 -08:00
emacs/test/lisp/eshell
Jim Porter d7b89ea407 Allow creating processes where only one of stdin or stdout is a PTY
* src/lisp.h (emacs_spawn):
* src/callproc.c (emacs_spawn): Add PTY_IN and PTY_OUT arguments to
specify which streams should be set up as a PTY.
(call_process): Adjust call to 'emacs_spawn'.

* src/process.h (Lisp_Process): Replace 'pty_flag' with 'pty_in' and
'pty_out'.

* src/process.c (is_pty_from_symbol): New function.
(make-process): Allow :connection-type to be a cons cell, and allow
using a stderr process with a PTY for stdin/stdout.
(create_process): Handle creating a process where only one of stdin or
stdout is a PTY.

* lisp/eshell/esh-proc.el (eshell-needs-pipe, eshell-needs-pipe-p):
Remove.
(eshell-gather-process-output): Use 'make-process' and set
':connection-type' as needed by the value of 'eshell-in-pipeline-p'.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't signal an
error when ':connection-type' is a cons cell.

* test/src/process-tests.el
(process-test-sentinel-wait-function-working-p): Allow passing PROC
in, and rework into...
(process-test-wait-for-sentinel): ... this.
(process-test-sentinel-accept-process-output)
(process-test-sentinel-sit-for, process-test-quoted-batfile)
(process-test-stderr-filter): Use 'process-test-wait-for-sentinel'.
(make/process/test-connection-type): New function.
(make-process/connection-type/pty, make-process/connection-type/pty-2)
(make-process/connection-type/pipe)
(make-process/connection-type/pipe-2)
(make-process/connection-type/in-pty)
(make-process/connection-type/out-pty)
(make-process/connection-type/pty-with-stderr-buffer)
(make-process/connection-type/out-pty-with-stderr-buffer): New tests.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test--detect-pty-cmd):
New variable.
(esh-proc-test/pipeline-connection-type/no-pipeline)
(esh-proc-test/pipeline-connection-type/first)
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): New tests.

* doc/lispref/processes.texi (Asynchronous Processes): Document new
':connection-type' behavior.
(Output from Processes): Remove caveat about ':stderr' forcing
'make-process' to use pipes.

* etc/NEWS: Announce this change (bug#56025).
2022-08-05 17:58:54 -07:00
..
em-alias-tests.el Ensure Eshell variable aliases properly handle indexing 2022-07-12 15:11:00 +02:00
em-basic-tests.el Add tests for Eshell's umask command 2022-03-29 16:50:45 +02:00
em-dirs-tests.el Ensure Eshell variable aliases properly handle indexing 2022-07-12 15:11:00 +02:00
em-extpipe-tests.el When closing an Eshell process target, send EOF three times 2022-06-26 18:27:20 +02:00
em-glob-tests.el Make Eshell globs ending in "/" match directories only 2022-06-26 16:52:38 +02:00
em-hist-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
em-ls-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
em-pred-tests.el Optionally signal an error if an Eshell predicate fails to match anything 2022-06-26 16:51:21 +02:00
em-script-tests.el Improve tests/organization for built-in variables 2022-07-12 15:10:54 +02:00
em-tramp-tests.el Adapt em-tramp-tests.el 2022-02-06 18:50:16 +01:00
esh-opt-tests.el Treat "-" as a positional arg in 'eshell-eval-using-options' 2022-01-25 13:28:48 +01:00
esh-proc-tests.el Allow creating processes where only one of stdin or stdout is a PTY 2022-08-05 17:58:54 -07:00
esh-var-tests.el Ensure Eshell variable aliases properly handle indexing 2022-07-12 15:11:00 +02:00
eshell-tests-helpers.el Handle escaped characters in Eshell special references (e.g. buffers) 2022-05-01 20:41:23 +02:00
eshell-tests.el Improve tests/organization for built-in variables 2022-07-12 15:10:54 +02:00