diff options
| author | Eli Zaretskii | 2018-12-12 18:27:05 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-12-12 18:27:05 +0200 |
| commit | 6e76e11c4200a4d4185e0b7d6cea5164d459737b (patch) | |
| tree | 7a96134416ee2d6ae1733e8333c1a8e08aadb690 /test | |
| parent | 8c28ac8023cee235885ab0f44b73dbfef6f0a10d (diff) | |
| download | emacs-6e76e11c4200a4d4185e0b7d6cea5164d459737b.tar.gz emacs-6e76e11c4200a4d4185e0b7d6cea5164d459737b.zip | |
Fix regression in expand-file-name with drive-relative HOME
* src/fileio.c (get_homedir) [DOS_NT]: Expand drive-relative
$HOME to begin with "X:/".
* test/src/fileio-tests.el (fileio-tests--relative-HOME): Add
testing of drive-relative value of $HOME on MS-Windows and
MS-DOS.
Diffstat (limited to 'test')
| -rw-r--r-- | test/src/fileio-tests.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index b7b78bbda09..a74bcea41f2 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -102,4 +102,8 @@ Also check that an encoding error can appear in a symlink." | |||
| 102 | (setenv "HOME" "a/b/c") | 102 | (setenv "HOME" "a/b/c") |
| 103 | (should (equal (expand-file-name "~/foo") | 103 | (should (equal (expand-file-name "~/foo") |
| 104 | (expand-file-name "a/b/c/foo"))) | 104 | (expand-file-name "a/b/c/foo"))) |
| 105 | (when (memq system-type '(ms-dos windows-nt)) | ||
| 106 | ;; Test expansion of drive-relative file names. | ||
| 107 | (setenv "HOME" "x:foo") | ||
| 108 | (should (equal (expand-file-name "~/bar") "x:/foo/bar"))) | ||
| 105 | (setenv "HOME" old-home))) | 109 | (setenv "HOME" old-home))) |