diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/src/fileio-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index 5d12685fa19..b7b78bbda09 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -95,3 +95,11 @@ Also check that an encoding error can appear in a symlink." | |||
| 95 | (should (equal (file-name-as-directory "d:/abc/") "d:/abc/")) | 95 | (should (equal (file-name-as-directory "d:/abc/") "d:/abc/")) |
| 96 | (should (equal (file-name-as-directory "D:\\abc/") "d:/abc/")) | 96 | (should (equal (file-name-as-directory "D:\\abc/") "d:/abc/")) |
| 97 | (should (equal (file-name-as-directory "D:/abc//") "d:/abc//"))) | 97 | (should (equal (file-name-as-directory "D:/abc//") "d:/abc//"))) |
| 98 | |||
| 99 | (ert-deftest fileio-tests--relative-HOME () | ||
| 100 | "Test that expand-file-name works even when HOME is relative." | ||
| 101 | (let ((old-home (getenv "HOME"))) | ||
| 102 | (setenv "HOME" "a/b/c") | ||
| 103 | (should (equal (expand-file-name "~/foo") | ||
| 104 | (expand-file-name "a/b/c/foo"))) | ||
| 105 | (setenv "HOME" old-home))) | ||