aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2017-11-18 14:24:03 +0100
committerMichael Albinus2017-11-18 14:24:03 +0100
commitc355529baedf3a5f03a8a4ee5904a5918f456b64 (patch)
treeba8058621743277be10798e2099fd3589c0c88d9 /test
parent4c21d04057d5f4f801d57e8aa2ffdab834ddc48a (diff)
downloademacs-c355529baedf3a5f03a8a4ee5904a5918f456b64.tar.gz
emacs-c355529baedf3a5f03a8a4ee5904a5918f456b64.zip
Fix bug in tramp-handle-file-truename
* lisp/net/tramp.el (tramp-handle-file-truename): Expand localname. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Check also relative symbolic links.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index cf85b071e19..62f72a3f6f6 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2671,7 +2671,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2671 (should-error 2671 (should-error
2672 (make-symbolic-link tmp-name1 tmp-name2) 2672 (make-symbolic-link tmp-name1 tmp-name2)
2673 :type 'file-already-exists) 2673 :type 'file-already-exists)
2674 ;; number means interactive case. 2674 ;; A number means interactive case.
2675 (cl-letf (((symbol-function 'yes-or-no-p) 'ignore)) 2675 (cl-letf (((symbol-function 'yes-or-no-p) 'ignore))
2676 (should-error 2676 (should-error
2677 (make-symbolic-link tmp-name1 tmp-name2 0) 2677 (make-symbolic-link tmp-name1 tmp-name2 0)
@@ -2783,6 +2783,15 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2783 (should 2783 (should
2784 (string-equal (file-truename tmp-name1) (file-truename tmp-name2))) 2784 (string-equal (file-truename tmp-name1) (file-truename tmp-name2)))
2785 (should (file-equal-p tmp-name1 tmp-name2)) 2785 (should (file-equal-p tmp-name1 tmp-name2))
2786 ;; Check relative symlink file name.
2787 (delete-file tmp-name2)
2788 (let ((default-directory tramp-test-temporary-file-directory))
2789 (make-symbolic-link (file-name-nondirectory tmp-name1) tmp-name2))
2790 (should (file-symlink-p tmp-name2))
2791 (should-not (string-equal tmp-name2 (file-truename tmp-name2)))
2792 (should
2793 (string-equal (file-truename tmp-name1) (file-truename tmp-name2)))
2794 (should (file-equal-p tmp-name1 tmp-name2))
2786 ;; Symbolic links could look like a remote file name. 2795 ;; Symbolic links could look like a remote file name.
2787 ;; They must be quoted then. 2796 ;; They must be quoted then.
2788 (delete-file tmp-name2) 2797 (delete-file tmp-name2)