diff options
| author | Michael Albinus | 2022-01-17 10:46:58 +0100 |
|---|---|---|
| committer | Michael Albinus | 2022-01-17 10:46:58 +0100 |
| commit | c9d06d080bb2bd012813d6e5ac1f3deb32ccb29f (patch) | |
| tree | c1971052479f79da7c286375539eca80fc090999 /test | |
| parent | 65666c47863c4ad2ed4bacd1a0bc5e638269df52 (diff) | |
| download | emacs-c9d06d080bb2bd012813d6e5ac1f3deb32ccb29f.tar.gz emacs-c9d06d080bb2bd012813d6e5ac1f3deb32ccb29f.zip | |
Improve handling of INFILE in tramp*-process-file (Bug#53284)
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve handling of INFILE. Fix thinko using
`process-file-side-effects'. (Bug#53284)
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-set-file-times'.
(tramp-sshfs-handle-set-file-times): New defun.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Extend test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index ea0ff3c760e..a07d749916e 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -4504,7 +4504,19 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4504 | (should | 4504 | (should |
| 4505 | (string-equal (format "%s\n%s\n" fnnd fnnd) (buffer-string))) | 4505 | (string-equal (format "%s\n%s\n" fnnd fnnd) (buffer-string))) |
| 4506 | ;; A non-nil DISPLAY must not raise the buffer. | 4506 | ;; A non-nil DISPLAY must not raise the buffer. |
| 4507 | (should-not (get-buffer-window (current-buffer) t)))) | 4507 | (should-not (get-buffer-window (current-buffer) t)) |
| 4508 | (delete-file tmp-name)) | ||
| 4509 | |||
| 4510 | ;; Check remote and local INFILE. | ||
| 4511 | (dolist (local '(nil t)) | ||
| 4512 | (with-temp-buffer | ||
| 4513 | (setq tmp-name (tramp--test-make-temp-name local quoted)) | ||
| 4514 | (write-region "foo" nil tmp-name) | ||
| 4515 | (should (file-exists-p tmp-name)) | ||
| 4516 | (should (zerop (process-file "cat" tmp-name t))) | ||
| 4517 | (should (string-equal "foo" (buffer-string))) | ||
| 4518 | (should-not (get-buffer-window (current-buffer) t))) | ||
| 4519 | (delete-file tmp-name))) | ||
| 4508 | 4520 | ||
| 4509 | ;; Cleanup. | 4521 | ;; Cleanup. |
| 4510 | (ignore-errors (delete-file tmp-name)))))) | 4522 | (ignore-errors (delete-file tmp-name)))))) |