aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2018-03-26 14:33:24 +0200
committerMichael Albinus2018-03-26 14:33:24 +0200
commitf5834c9ba06529bcd0a6da464f0a808e1be53c5c (patch)
tree3dcd1bdb720012cacaa96e20896630b1343e10a0 /test
parent9c1176247b107fd6e1845618b78ad56b5d57ddd9 (diff)
downloademacs-f5834c9ba06529bcd0a6da464f0a808e1be53c5c.tar.gz
emacs-f5834c9ba06529bcd0a6da464f0a808e1be53c5c.zip
Fix problem with trailing slash in Tramp
* lisp/net/tramp.el (tramp-handle-file-truename): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Fix problem with trailing slash. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Test also quoted directories.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 8e21f5220fc..5851840d009 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3117,13 +3117,15 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
3117 (delete-file tmp-name1) 3117 (delete-file tmp-name1)
3118 (delete-file tmp-name2))) 3118 (delete-file tmp-name2)))
3119 3119
3120 ;; `file-truename' shall preserve trailing link of directories. 3120 ;; `file-truename' shall preserve trailing slash of directories.
3121 (unless (file-symlink-p tramp-test-temporary-file-directory) 3121 (let* ((dir1
3122 (let* ((dir1 (directory-file-name tramp-test-temporary-file-directory)) 3122 (directory-file-name
3123 (dir2 (file-name-as-directory dir1))) 3123 (funcall
3124 (should (string-equal (file-truename dir1) (expand-file-name dir1))) 3124 (if quoted 'tramp-compat-file-name-quote 'identity)
3125 (should 3125 tramp-test-temporary-file-directory)))
3126 (string-equal (file-truename dir2) (expand-file-name dir2)))))))) 3126 (dir2 (file-name-as-directory dir1)))
3127 (should (string-equal (file-truename dir1) (expand-file-name dir1)))
3128 (should (string-equal (file-truename dir2) (expand-file-name dir2)))))))
3127 3129
3128(ert-deftest tramp-test22-file-times () 3130(ert-deftest tramp-test22-file-times ()
3129 "Check `set-file-times' and `file-newer-than-file-p'." 3131 "Check `set-file-times' and `file-newer-than-file-p'."