aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorMichael Albinus2019-12-29 13:53:06 +0100
committerMichael Albinus2019-12-29 13:53:06 +0100
commitd6922db49dea33ac2bca8b33d24763cc7b2e4cd7 (patch)
treeafb4f75d73cbfb59abb4d3553b51aa10578328f3 /test/lisp
parent70fe552c61eaf36801c2b8691379315098df13e4 (diff)
downloademacs-d6922db49dea33ac2bca8b33d24763cc7b2e4cd7.tar.gz
emacs-d6922db49dea33ac2bca8b33d24763cc7b2e4cd7.zip
Sync with Tramp 2.4.3
* doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.3". * lisp/net/tramp.el: Bump version. (tramp-handle-shell-command): The temp file for error-buffer is remote. * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Simplify buffer generation. (tramp-test32-shell-command): Extend test.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/net/tramp-tests.el34
1 files changed, 20 insertions, 14 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 77b3ea0ad21..cb52d40f8be 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2902,8 +2902,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
2902 (sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<)))) 2902 (sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<))))
2903 2903
2904 ;; Cleanup. 2904 ;; Cleanup.
2905 (ignore-errors 2905 (ignore-errors (delete-directory tmp-name1 'recursive))))))
2906 (delete-directory tmp-name1 'recursive))))))
2907 2906
2908(ert-deftest tramp-test17-insert-directory () 2907(ert-deftest tramp-test17-insert-directory ()
2909 "Check `insert-directory'." 2908 "Check `insert-directory'."
@@ -4354,8 +4353,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4354 4353
4355 ;; Process with stderr. tramp-adb.el doesn't support it (yet). 4354 ;; Process with stderr. tramp-adb.el doesn't support it (yet).
4356 (unless (tramp--test-adb-p) 4355 (unless (tramp--test-adb-p)
4357 (let ((stderr 4356 (let ((stderr (generate-new-buffer "*stderr*")))
4358 (generate-new-buffer (generate-new-buffer-name "stderr"))))
4359 (unwind-protect 4357 (unwind-protect
4360 (with-temp-buffer 4358 (with-temp-buffer
4361 (setq proc 4359 (setq proc
@@ -4458,6 +4456,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4458 ;; Cleanup. 4456 ;; Cleanup.
4459 (ignore-errors (delete-file tmp-name))) 4457 (ignore-errors (delete-file tmp-name)))
4460 4458
4459 ;; Test `shell-command' with error buffer.
4460 (let ((stderr (generate-new-buffer "*stderr*")))
4461 (unwind-protect
4462 (with-temp-buffer
4463 (shell-command "error" (current-buffer) stderr)
4464 (should (= (point-min) (point-max)))
4465 (should
4466 (string-match
4467 "error:.+not found"
4468 (with-current-buffer stderr (buffer-string)))))
4469
4470 ;; Cleanup.
4471 (ignore-errors (kill-buffer stderr))))
4472
4461 ;; Test ordinary `async-shell-command'. 4473 ;; Test ordinary `async-shell-command'.
4462 (unwind-protect 4474 (unwind-protect
4463 (with-temp-buffer 4475 (with-temp-buffer
@@ -4475,10 +4487,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4475 (while 4487 (while
4476 (re-search-forward tramp-display-escape-sequence-regexp nil t) 4488 (re-search-forward tramp-display-escape-sequence-regexp nil t)
4477 (replace-match "" nil nil)) 4489 (replace-match "" nil nil))
4478 ;; There might be a nasty "Process *Async Shell* finished" message.
4479 (goto-char (point-min))
4480 (forward-line)
4481 (narrow-to-region (point-min) (point))
4482 (should 4490 (should
4483 (string-equal 4491 (string-equal
4484 (format "%s\n" (file-name-nondirectory tmp-name)) 4492 (format "%s\n" (file-name-nondirectory tmp-name))
@@ -4505,13 +4513,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4505 (while 4513 (while
4506 (re-search-forward tramp-display-escape-sequence-regexp nil t) 4514 (re-search-forward tramp-display-escape-sequence-regexp nil t)
4507 (replace-match "" nil nil)) 4515 (replace-match "" nil nil))
4508 ;; There might be a nasty "Process *Async Shell* finished" message. 4516 ;; We cannot use `string-equal', because tramp-adb.el
4509 (goto-char (point-min)) 4517 ;; echoes also the sent string.
4510 (forward-line)
4511 (narrow-to-region (point-min) (point))
4512 (should 4518 (should
4513 (string-equal 4519 (string-match
4514 (format "%s\n" (file-name-nondirectory tmp-name)) 4520 (format "\\`%s" (regexp-quote (file-name-nondirectory tmp-name)))
4515 (buffer-string)))) 4521 (buffer-string))))
4516 4522
4517 ;; Cleanup. 4523 ;; Cleanup.