aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorMichael Albinus2016-11-09 15:34:40 +0100
committerMichael Albinus2016-11-09 15:34:40 +0100
commitdba9bc9752f62c782853c7a652e84e33f0649c3b (patch)
treeb564b972c121e0c167bc923fc9b7d60337d8c973 /test/lisp
parent112111c4e489aae5cbe241ffa458d97b6a133d3a (diff)
downloademacs-dba9bc9752f62c782853c7a652e84e33f0649c3b.tar.gz
emacs-dba9bc9752f62c782853c7a652e84e33f0649c3b.zip
Refine multi-hop specs in Tramp
* lisp/net/tramp.el (tramp-tramp-file-p): Suppress "/:" and "/c:". * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax): Multi-hop specs don't need a method. "/h:" is allowed on non MS Windows.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/net/tramp-tests.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 5d9d3a039b6..4c3b83cdcd1 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -185,6 +185,8 @@ handled properly. BODY shall not contain a timeout."
185 (should (tramp-tramp-file-p "/method1:user1@host1|method2:user2@host2:")) 185 (should (tramp-tramp-file-p "/method1:user1@host1|method2:user2@host2:"))
186 (should (tramp-tramp-file-p 186 (should (tramp-tramp-file-p
187 "/method1:user1@host1|method2:user2@host2|method3:user3@host3:")) 187 "/method1:user1@host1|method2:user2@host2|method3:user3@host3:"))
188 (should (tramp-tramp-file-p "/host1|host2:"))
189 (should (tramp-tramp-file-p "/user1@host1|user2@host2:"))
188 190
189 ;; No strings. 191 ;; No strings.
190 (should-not (tramp-tramp-file-p nil)) 192 (should-not (tramp-tramp-file-p nil))
@@ -193,12 +195,13 @@ handled properly. BODY shall not contain a timeout."
193 (should-not (tramp-tramp-file-p "/::")) 195 (should-not (tramp-tramp-file-p "/::"))
194 (should-not (tramp-tramp-file-p "/:@:")) 196 (should-not (tramp-tramp-file-p "/:@:"))
195 (should-not (tramp-tramp-file-p "/:[]:")) 197 (should-not (tramp-tramp-file-p "/:[]:"))
196 ;; Multihops require a method.
197 (should-not (tramp-tramp-file-p "/host1|host2:"))
198 ;; Methods or hostnames shall be at least two characters on MS Windows. 198 ;; Methods or hostnames shall be at least two characters on MS Windows.
199 (when (memq system-type '(cygwin windows-nt)) 199 (let ((system-type 'windows-nt))
200 (should-not (tramp-tramp-file-p "/c:/path/to/file")) 200 (should-not (tramp-tramp-file-p "/c:/path/to/file"))
201 (should-not (tramp-tramp-file-p "/c::/path/to/file")))) 201 (should-not (tramp-tramp-file-p "/c::/path/to/file")))
202 (let ((system-type 'gnu/linux))
203 (should (tramp-tramp-file-p "/h:/path/to/file"))
204 (should (tramp-tramp-file-p "/m::/path/to/file"))))
202 205
203(ert-deftest tramp-test02-file-name-dissect () 206(ert-deftest tramp-test02-file-name-dissect ()
204 "Check remote file name components." 207 "Check remote file name components."