diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2019-07-12 15:10:57 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2019-07-12 15:10:57 +0200 |
commit | 955db220053778bd1e47ff9daf87896b7fd52a67 (patch) | |
tree | d7e7b138ee69930467f6eb40e6d211c3521c2ac3 /test/lisp/net | |
parent | 9f76913184c900534fa17311ff5b1af747ff6264 (diff) | |
download | emacs-955db220053778bd1e47ff9daf87896b7fd52a67.tar.gz |
Check directory in Tramp's {copy,rename}-file
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Check, that NEWNAME is not a directory given as file name.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Extend tests.
Diffstat (limited to 'test/lisp/net')
-rw-r--r-- | test/lisp/net/tramp-tests.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 77b2c263ff8..a12e41a8822 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2394,7 +2394,10 @@ This checks also `file-name-as-directory', `file-name-directory', (when (and (tramp--test-expensive-test) (tramp--test-emacs26-p)) (should-error (copy-file source target) - :type 'file-already-exists)) + :type 'file-already-exists) + (should-error + (copy-file source target 'ok) + :type 'file-error)) (copy-file source (file-name-as-directory target)) (should (file-exists-p @@ -2508,7 +2511,10 @@ This checks also `file-name-as-directory', `file-name-directory', (when (and (tramp--test-expensive-test) (tramp--test-emacs26-p)) (should-error (rename-file source target) - :type 'file-already-exists)) + :type 'file-already-exists) + (should-error + (rename-file source target 'ok) + :type 'file-error)) (rename-file source (file-name-as-directory target)) (should-not (file-exists-p source)) (should |