aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2016-05-02 09:02:27 +0200
committerMichael Albinus2016-05-02 09:02:27 +0200
commit1997d09f78b9b7a5c2d4068e0a7c7282978742fa (patch)
tree9acfcfa39c7a3bbb2fb0387b15aa5517760fb2dc /test
parent1cad62d81c9217e157274f89da37c0ffeaff4ce7 (diff)
downloademacs-1997d09f78b9b7a5c2d4068e0a7c7282978742fa.tar.gz
emacs-1997d09f78b9b7a5c2d4068e0a7c7282978742fa.zip
Fix Bug#10085
* lisp/net/tramp.el (tramp-find-foreign-file-name-handler): Add optional arguments OPERATION and COMPETION. Handle `file-name-as-directory', `file-name-directory' and `file-name-nondirectory' also in completion mode. (tramp-file-name-handler): Use it. (Bug#10085) * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name): Extend test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index a12ee387576..5090a5b0e41 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -637,7 +637,19 @@ This checks also `file-name-as-directory', `file-name-directory',
637 (should 637 (should
638 (string-equal (file-name-nondirectory "/method:host:/path/to/file/") "")) 638 (string-equal (file-name-nondirectory "/method:host:/path/to/file/") ""))
639 (should-not 639 (should-not
640 (unhandled-file-name-directory "/method:host:/path/to/file"))) 640 (unhandled-file-name-directory "/method:host:/path/to/file"))
641
642 ;; Bug#10085.
643 (dolist (n-e '(nil t))
644 (let ((non-essential n-e))
645 (dolist (file
646 `(,(file-remote-p tramp-test-temporary-file-directory 'method)
647 ,(file-remote-p tramp-test-temporary-file-directory 'host)))
648 (setq file (format "/%s:" file))
649 (should (string-equal (directory-file-name file) file))
650 (should (string-equal (file-name-as-directory file) (concat file "./")))
651 (should (string-equal (file-name-directory file) file))
652 (should (string-equal (file-name-nondirectory file) ""))))))
641 653
642(ert-deftest tramp-test07-file-exists-p () 654(ert-deftest tramp-test07-file-exists-p ()
643 "Check `file-exist-p', `write-region' and `delete-file'." 655 "Check `file-exist-p', `write-region' and `delete-file'."