summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-12-06 19:36:15 +0100
committerMichael Albinus <michael.albinus@gmx.de>2021-12-06 19:36:15 +0100
commite135f15aac84bcc1357fe98aea56d9e198f51e8f (patch)
tree02b25ff79c8247c655c7aef761f89f727ab095b6 /test
parentaa63064fec4b94bbe090ea17965062bfc11ee944 (diff)
downloademacs-e135f15aac84bcc1357fe98aea56d9e198f51e8f.tar.gz
Tramp code cleanup
* lisp/net/tramp.el (tramp-get-default-directory) (tramp-get-buffer-string): New defsubsts. (tramp-message, tramp-error-with-buffer) (tramp-file-name-for-operation, tramp-command-completion-p) (tramp-action-login, tramp-action-yesno, tramp-action-yn) (tramp-action-terminal, tramp-action-confirm-message) (tramp-wait-for-regexp, tramp-call-process) (tramp-call-process-region, tramp-read-passwd): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers) (tramp-reporter-dump-variable): * lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-gio-monitor-process-filter): * lisp/net/tramp-smb.el (tramp-smb-action-set-acl): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-name-all-completions): * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case) (tramp-test32-shell-command): Use them.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index c047f666dae..a572ff83d3f 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -219,8 +219,7 @@ is greater than 10.
(when (and (null tramp--test-instrument-test-case-p) (> tramp-verbose 3))
(untrace-all)
(dolist (buf (tramp-list-tramp-buffers))
- (with-current-buffer buf
- (message ";; %s\n%s" buf (buffer-string)))
+ (message ";; %s\n%s" buf (tramp-get-buffer-string buf))
(kill-buffer buf))))))
(defsubst tramp--test-message (fmt-string &rest arguments)
@@ -5054,8 +5053,8 @@ INPUT, if non-nil, is a string sent to the process."
"echo foo >&2; echo bar" (current-buffer) stderr)
(should (string-equal "bar\n" (buffer-string)))
;; Check stderr.
- (with-current-buffer stderr
- (should (string-equal "foo\n" (buffer-string)))))
+ (should
+ (string-equal "foo\n" (tramp-get-buffer-string stderr))))
;; Cleanup.
(ignore-errors (kill-buffer stderr))))))