aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2018-05-24 16:55:16 +0200
committerMichael Albinus2018-05-24 16:55:16 +0200
commit9fe9f21515ccb4562269cc6ce8dfcebc4cd11384 (patch)
treeaa26d99797ddc401bd01e70f27304e3043cdaa44 /test
parent5444cb5f6867d43d1c21f30949e2002d8450cbc2 (diff)
downloademacs-9fe9f21515ccb4562269cc6ce8dfcebc4cd11384.tar.gz
emacs-9fe9f21515ccb4562269cc6ce8dfcebc4cd11384.zip
Fix file name completion in Tramp
* lisp/net/tramp.el (tramp-handle-file-name-directory): Fix case of localname starts w/o a slash. * 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.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 65ffcb34f76..09e9bac9e5c 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -1939,6 +1939,14 @@ This checks also `file-name-as-directory', `file-name-directory',
1939 (file-name-directory "/method:host:/path/to/file/") 1939 (file-name-directory "/method:host:/path/to/file/")
1940 "/method:host:/path/to/file/")) 1940 "/method:host:/path/to/file/"))
1941 (should 1941 (should
1942 (string-equal (file-name-directory "/method:host:file") "/method:host:"))
1943 (should
1944 (string-equal
1945 (file-name-directory "/method:host:path/") "/method:host:path/"))
1946 (should
1947 (string-equal
1948 (file-name-directory "/method:host:path/to") "/method:host:path/"))
1949 (should
1942 (string-equal (file-name-nondirectory "/method:host:/path/to/file") "file")) 1950 (string-equal (file-name-nondirectory "/method:host:/path/to/file") "file"))
1943 (should 1951 (should
1944 (string-equal (file-name-nondirectory "/method:host:/path/to/file/") "")) 1952 (string-equal (file-name-nondirectory "/method:host:/path/to/file/") ""))