aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2020-01-24 14:42:12 +0100
committerMichael Albinus2020-01-24 14:42:12 +0100
commitff630b56939541752097e5cc87c3db1de68d4c5f (patch)
tree3e56267370a64259415ed82e485b6db8d8ef9008
parent0debadb4e3427d22a2240ada88d2a8fec3b0d804 (diff)
downloademacs-ff630b56939541752097e5cc87c3db1de68d4c5f.tar.gz
emacs-ff630b56939541752097e5cc87c3db1de68d4c5f.zip
Adapt tramp-test32-shell-command
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Test error buffer for synchronous `shell-command' only.
-rw-r--r--test/lisp/net/tramp-tests.el29
1 files changed, 12 insertions, 17 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 247f878d3c5..129652839c4 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4492,25 +4492,20 @@ INPUT, if non-nil, is a string sent to the process."
4492 (buffer-string)))) 4492 (buffer-string))))
4493 4493
4494 ;; Cleanup. 4494 ;; Cleanup.
4495 (ignore-errors (delete-file tmp-name))) 4495 (ignore-errors (delete-file tmp-name))))
4496 4496
4497 ;; Test `{async-}shell-command' with error buffer. 4497 ;; Test `shell-command' with error buffer.
4498 (let ((stderr (generate-new-buffer "*stderr*"))) 4498 (let ((stderr (generate-new-buffer "*stderr*")))
4499 (unwind-protect 4499 (unwind-protect
4500 (with-temp-buffer 4500 (with-temp-buffer
4501 (funcall 4501 (shell-command "echo foo; echo bar >&2" (current-buffer) stderr)
4502 this-shell-command "cat /; sleep 1" (current-buffer) stderr) 4502 (should (string-equal "foo\n" (buffer-string)))
4503 ;; Check stderr. 4503 ;; Check stderr.
4504 (when (eq this-shell-command #'tramp--test-async-shell-command) 4504 (with-current-buffer stderr
4505 (ignore-errors 4505 (should (string-equal "bar\n" (buffer-string)))))
4506 (delete-process (get-buffer-process (current-buffer)))))
4507 (should (zerop (buffer-size)))
4508 (with-current-buffer stderr
4509 (should
4510 (string-match "cat:.* Is a directory" (buffer-string)))))
4511 4506
4512 ;; Cleanup. 4507 ;; Cleanup.
4513 (ignore-errors (kill-buffer stderr))))) 4508 (ignore-errors (kill-buffer stderr))))
4514 4509
4515 ;; Test sending string to `async-shell-command'. 4510 ;; Test sending string to `async-shell-command'.
4516 (unwind-protect 4511 (unwind-protect