aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2016-12-09 19:54:20 +0100
committerMichael Albinus2016-12-09 19:54:20 +0100
commitfc0fd24c105bde4c001ebebe4b8b7e1f96cd2871 (patch)
tree829cee069c4c5a07e2c976f00899f9809f4c278e /test
parent57a77f833e37abe2f7936585e9915b6947e3564a (diff)
downloademacs-fc0fd24c105bde4c001ebebe4b8b7e1f96cd2871.tar.gz
emacs-fc0fd24c105bde4c001ebebe4b8b7e1f96cd2871.zip
Fix further problems with quoted file names in Tramp
* lisp/net/tramp.el (tramp-quoted-name-p, tramp-quote-name) (tramp-unquote-name): Move defsubst ... * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p) (tramp-compat-file-name-quote) (tramp-compat-file-name-unquote): ... here. Adapt callees. * lisp/net/tramp-cache.el (tramp-flush-file-property) (tramp-flush-directory-property): * lisp/net/tramp-gvfs.el (tramp-gvfs-url-file-name): * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-share, tramp-smb-get-localname): Handle quoted files.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index c2984dfc776..2d17fa08ca5 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -116,7 +116,7 @@ being the result.")
116If LOCAL is non-nil, a local file is created. 116If LOCAL is non-nil, a local file is created.
117If QUOTED is non-nil, the local part of the file is quoted." 117If QUOTED is non-nil, the local part of the file is quoted."
118 (funcall 118 (funcall
119 (if quoted 'tramp-quote-name 'identity) 119 (if quoted 'tramp-compat-file-name-quote 'identity)
120 (expand-file-name 120 (expand-file-name
121 (make-temp-name "tramp-test") 121 (make-temp-name "tramp-test")
122 (if local temporary-file-directory tramp-test-temporary-file-directory)))) 122 (if local temporary-file-directory tramp-test-temporary-file-directory))))
@@ -1252,7 +1252,7 @@ This tests also `file-readable-p', `file-regular-p' and
1252 (should 1252 (should
1253 (string-equal 1253 (string-equal
1254 (funcall 1254 (funcall
1255 (if quoted 'tramp-quote-name 'identity) 1255 (if quoted 'tramp-compat-file-name-quote 'identity)
1256 (car attr)) 1256 (car attr))
1257 (file-remote-p (file-truename tmp-name1) 'localname))) 1257 (file-remote-p (file-truename tmp-name1) 'localname)))
1258 (delete-file tmp-name2)) 1258 (delete-file tmp-name2))
@@ -2010,7 +2010,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2010 (string-equal 2010 (string-equal
2011 (make-auto-save-file-name) 2011 (make-auto-save-file-name)
2012 (funcall 2012 (funcall
2013 (if quoted 'tramp-quote-name 'identity) 2013 (if quoted 'tramp-compat-file-name-quote 'identity)
2014 (expand-file-name 2014 (expand-file-name
2015 (format "#%s#" (file-name-nondirectory tmp-name1)) 2015 (format "#%s#" (file-name-nondirectory tmp-name1))
2016 tramp-test-temporary-file-directory)))))) 2016 tramp-test-temporary-file-directory))))))
@@ -2033,7 +2033,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2033 ("|" . "__") 2033 ("|" . "__")
2034 ("[" . "_l") 2034 ("[" . "_l")
2035 ("]" . "_r")) 2035 ("]" . "_r"))
2036 (tramp-unquote-name tmp-name1))) 2036 (tramp-compat-file-name-unquote tmp-name1)))
2037 tmp-name2))) 2037 tmp-name2)))
2038 (should (file-directory-p tmp-name2)))) 2038 (should (file-directory-p tmp-name2))))
2039 2039
@@ -2056,7 +2056,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2056 ("|" . "__") 2056 ("|" . "__")
2057 ("[" . "_l") 2057 ("[" . "_l")
2058 ("]" . "_r")) 2058 ("]" . "_r"))
2059 (tramp-unquote-name tmp-name1))) 2059 (tramp-compat-file-name-unquote tmp-name1)))
2060 tmp-name2))) 2060 tmp-name2)))
2061 (should (file-directory-p tmp-name2))))) 2061 (should (file-directory-p tmp-name2)))))
2062 2062
@@ -2188,7 +2188,7 @@ Several special characters do not work properly there."
2188 (should 2188 (should
2189 (string-equal 2189 (string-equal
2190 (funcall 2190 (funcall
2191 (if quoted 'tramp-quote-name 'identity) 2191 (if quoted 'tramp-compat-file-name-quote 'identity)
2192 (car (file-attributes file3))) 2192 (car (file-attributes file3)))
2193 (file-remote-p (file-truename file1) 'localname))) 2193 (file-remote-p (file-truename file1) 'localname)))
2194 ;; Check file contents. 2194 ;; Check file contents.
@@ -2264,7 +2264,7 @@ Several special characters do not work properly there."
2264 (should 2264 (should
2265 (string-equal 2265 (string-equal
2266 (funcall 2266 (funcall
2267 (if quoted 'tramp-quote-name 'identity) 2267 (if quoted 'tramp-compat-file-name-quote 'identity)
2268 (cadr (car (directory-files-and-attributes 2268 (cadr (car (directory-files-and-attributes
2269 file1 nil (regexp-quote elt1))))) 2269 file1 nil (regexp-quote elt1)))))
2270 (file-remote-p (file-truename file2) 'localname))) 2270 (file-remote-p (file-truename file2) 'localname)))