aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJim Porter2023-01-22 22:54:53 -0800
committerJim Porter2023-01-23 09:48:09 -0800
commit7f438ff543b7bd83cee6c75be1d16abc1215d37f (patch)
treeddca7acf2572a39268ce5d6ead0182861f8b2e80 /test
parentcb9628373a8dcb5ace0cb8fcc7b636dea39b5703 (diff)
downloademacs-7f438ff543b7bd83cee6c75be1d16abc1215d37f.tar.gz
emacs-7f438ff543b7bd83cee6c75be1d16abc1215d37f.zip
Don't try to make a pipe process for remote processes in Eshell
Tramp currently isn't able to handle this, so the result will just produce an error (bug#61024). * lisp/eshell/esh-proc.el (eshell-gather-process-output): Check for a remote 'default-directory' before trying to make a pipe process. * test/lisp/eshell/esh-proc-tests.el (esh-var-test/output/remote-redirect): New test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/eshell/esh-proc-tests.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el
index ae7b1dddd69..8e02fbb5497 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -19,6 +19,7 @@
19 19
20;;; Code: 20;;; Code:
21 21
22(require 'tramp)
22(require 'ert) 23(require 'ert)
23(require 'esh-mode) 24(require 'esh-mode)
24(require 'eshell) 25(require 'eshell)
@@ -85,6 +86,18 @@
85 "\\`\\'")) 86 "\\`\\'"))
86 (should (equal (buffer-string) "stdout\nstderr\n")))) 87 (should (equal (buffer-string) "stdout\nstderr\n"))))
87 88
89(ert-deftest esh-var-test/output/remote-redirect ()
90 "Check that redirecting stdout for a remote process works."
91 (skip-unless (and (eshell-tests-remote-accessible-p)
92 (executable-find "echo")))
93 (let ((default-directory ert-remote-temporary-file-directory))
94 (eshell-with-temp-buffer bufname "old"
95 (with-temp-eshell
96 (eshell-match-command-output
97 (format "*echo hello > #<%s>" bufname)
98 "\\`\\'"))
99 (should (equal (buffer-string) "hello\n")))))
100
88 101
89;; Exit status 102;; Exit status
90 103