1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
emacs/test/lisp/eshell
Jim Porter 6defbd65b6 Fix handling of output handles in nested Eshell forms
Previously, the output handles in nested forms would be reset to the
default, leading to wrong behavior for commands like

  {echo a; echo b} > file

"b" would be written to "file" as expected, but "a" would go to
standard output (bug#59545).

* lisp/eshell/esh-cmd.el (eshell-parse-command): Use
'eshell-with-copied-handles' for each statement within the whole
Eshell command.

* test/lisp/eshell/esh-io-tests.el (esh-io-test/redirect-subcommands)
(esh-io-test/redirect-subcommands/override)
(esh-io-test/redirect-subcommands/interpolated): New tests.

* test/lisp/eshell/em-script-tests.el
(em-script-test/source-script/redirect)
(em-script-test/source-script/redirect/dev-null): New tests.
(em-script-test/source-script, em-script-test/source-script/arg-vars)
(em-script-test/source-script/all-args-var): Tweak names/docstrings.

* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-tests--deftest):
Skip over the newly-added 'eshell-with-copied-handles' form when
checking the parse results.

* test/lisp/eshell/em-tramp-tests.el (em-tramp-test/su-default)
(em-tramp-test/su-user, em-tramp-test/su-login)
(em-tramp-test/sudo-shell, em-tramp-test/sudo-user-shell)
(em-tramp-test/doas-shell, em-tramp-test/doas-user-shell): Update
expected command forms.
2022-12-22 11:35:12 -08:00
..
em-alias-tests.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
em-basic-tests.el Add 'eshell-command-result-equal' with an ERT explainer 2022-08-15 20:40:27 -07:00
em-dirs-tests.el Add 'eshell-command-result-equal' with an ERT explainer 2022-08-15 20:40:27 -07:00
em-extpipe-tests.el Fix handling of output handles in nested Eshell forms 2022-12-22 11:35:12 -08: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 ; Improve time-convert call in recently changed test 2022-08-07 13:16:53 +02:00
em-script-tests.el Fix handling of output handles in nested Eshell forms 2022-12-22 11:35:12 -08:00
em-tramp-tests.el Fix handling of output handles in nested Eshell forms 2022-12-22 11:35:12 -08:00
esh-arg-tests.el Treat escaped newlines in Eshell as the empty string 2022-12-07 21:39:07 -08:00
esh-cmd-tests.el Simplify Eshell handle functions and add tests/documentation 2022-09-04 15:15:01 -07:00
esh-ext-tests.el Improve handling of $PATH in Eshell for remote directories 2022-10-17 18:48:52 -07:00
esh-io-tests.el Fix handling of output handles in nested Eshell forms 2022-12-22 11:35:12 -08: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 ; Fix a race condition in an Eshell test 2022-09-08 15:13:17 -07:00
esh-util-tests.el Only strip newlines when stringifying a value for Eshell 2022-11-03 11:44:41 -07:00
esh-var-tests.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
eshell-tests-helpers.el Improve handling of $PATH in Eshell for remote directories 2022-10-17 18:48:52 -07:00
eshell-tests.el Treat escaped newlines in Eshell as the empty string 2022-12-07 21:39:07 -08:00