1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 23:31:55 -08:00
emacs/test/src
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
..
comp-resources Merge from origin/emacs-28 2022-07-14 11:56:56 +02:00
emacs-module-resources Decouple mod-test.c from Gnulib 2022-03-08 18:51:18 -08:00
lread-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
regex-resources ; Fix more typos 2020-10-03 12:53:51 +02:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
buffer-tests.el Update buffer's chars-modified tick when inserting from gap 2022-07-21 12:40:28 +03:00
callint-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
callproc-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
casefiddle-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
character-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
charset-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
chartab-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
cmds-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
coding-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
comp-tests.el Merge from origin/emacs-28 2022-07-14 11:56:56 +02:00
data-tests.el Fix lsh warning shortcomings (bug#56641) 2022-07-23 18:42:11 +02:00
decompress-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
doc-tests.el Adjust doc-tests-documentation/autoloaded-macro 2022-02-20 17:42:21 +01:00
editfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
emacs-module-tests.el Decouple mod-test.c from Gnulib 2022-03-08 18:51:18 -08:00
emacs-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
eval-tests.el Fix atimer setting and overdue expiration (bug#55628) 2022-05-30 15:52:02 +02:00
fileio-tests.el Fix file-name-case-insensitive-p in ffap (bug#56443) 2022-07-08 15:13:21 +02:00
filelock-tests.el Extend filelock-tests.el for bug#53207 2022-01-31 15:26:06 +01:00
floatfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
fns-tests.el Add take and ntake (bug#56521) 2022-07-17 17:35:49 +02:00
font-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
image-tests.el ; Pacify some --without-x byte-compiler warnings. 2022-05-07 20:18:51 +03:00
indent-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
inotify-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
json-tests.el Allow NUL characters in JSON input 2022-07-02 15:06:24 +02:00
keyboard-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keymap-tests.el Signal error on duplicate key definitions 2022-08-02 14:29:43 +02:00
lcms-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lread-tests.el Let ?\LF signal an error (bug#55738) 2022-06-03 11:23:30 +02:00
marker-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
minibuf-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
print-tests.el ; Use values instead of trying to ignore them 2022-07-31 12:57:47 +02:00
process-tests.el Allow creating processes where only one of stdin or stdout is a PTY 2022-08-05 17:58:54 -07:00
regex-emacs-tests.el Audit quoting the quote character in doc strings 2022-04-22 16:17:22 +02:00
search-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
sqlite-tests.el Allow inserting and selecting binary blobs from sqlite 2022-04-28 14:58:53 +02:00
syntax-tests.el Fix Fchar_syntax for non-ASCII in unibyte buffers 2022-01-20 11:44:07 +01:00
textprop-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
thread-tests.el Rewrite thread context switch code (bug#48990) 2022-02-12 15:25:53 -05:00
timefns-tests.el Don’t test time functions for NaNs, INF 2022-06-15 23:27:08 -05:00
undo-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
xdisp-tests.el Allow redirecting `message' output to a different buffer 2022-01-29 17:24:49 +01:00
xfaces-tests.el Don't accept whitespace or hex floats in rgbi: colour specs 2022-03-06 14:07:26 +01:00
xml-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00