aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/fileio-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el
index 1516590795e..8b76912f5e1 100644
--- a/test/src/fileio-tests.el
+++ b/test/src/fileio-tests.el
@@ -108,6 +108,14 @@ Also check that an encoding error can appear in a symlink."
108 (should (equal (expand-file-name "~/bar") "x:/foo/bar"))) 108 (should (equal (expand-file-name "~/bar") "x:/foo/bar")))
109 (setenv "HOME" old-home))) 109 (setenv "HOME" old-home)))
110 110
111(ert-deftest fileio-tests--HOME-trailing-slash ()
112 "Test that expand-file-name of \"~\" respects trailing slash."
113 (let ((old-home (getenv "HOME")))
114 (dolist (home '("/a/b/c" "/a/b/c/"))
115 (setenv "HOME" home)
116 (should (equal (expand-file-name "~") (expand-file-name home))))
117 (setenv "HOME" old-home)))
118
111(ert-deftest fileio-tests--expand-file-name-trailing-slash () 119(ert-deftest fileio-tests--expand-file-name-trailing-slash ()
112 (dolist (fooslashalias '("foo/" "foo//" "foo/." "foo//." "foo///././." 120 (dolist (fooslashalias '("foo/" "foo//" "foo/." "foo//." "foo///././."
113 "foo/a/..")) 121 "foo/a/.."))