diff options
| author | Eli Zaretskii | 2017-08-01 17:45:25 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-08-01 17:45:25 +0300 |
| commit | 21375a29ac9700810b90a34bd9825b1ca8f0c8e6 (patch) | |
| tree | 0ed0155f5a5b28dc835a0d7a32e0be9fa51a712c /test | |
| parent | f3ad15933a0d104b099d640d5c43fce99ece0003 (diff) | |
| download | emacs-21375a29ac9700810b90a34bd9825b1ca8f0c8e6.tar.gz emacs-21375a29ac9700810b90a34bd9825b1ca8f0c8e6.zip | |
Fix some dired-tests.el on MS-Windows
* test/lisp/dired-tests.el (dired-test-bug27243-01)
(dired-test-bug27243-02): On MS-Windows, pass test-dir through
file-truename, to avoid bogus failures due to file-name comparison
as strings.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/dired-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 5900fead7d1..8657910a496 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el | |||
| @@ -124,6 +124,11 @@ | |||
| 124 | "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#5 ." | 124 | "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#5 ." |
| 125 | (let ((test-dir (file-name-as-directory (make-temp-file "test-dir-" t))) | 125 | (let ((test-dir (file-name-as-directory (make-temp-file "test-dir-" t))) |
| 126 | (dired-auto-revert-buffer t) buffers) | 126 | (dired-auto-revert-buffer t) buffers) |
| 127 | ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the | ||
| 128 | ;; corresponding long file names exist, otherwise such names trip | ||
| 129 | ;; dired-buffers-for-dir. | ||
| 130 | (if (eq system-type 'windows-nt) | ||
| 131 | (setq test-dir (file-truename test-dir))) | ||
| 127 | (should-not (dired-buffers-for-dir test-dir)) | 132 | (should-not (dired-buffers-for-dir test-dir)) |
| 128 | (with-current-buffer (find-file-noselect test-dir) | 133 | (with-current-buffer (find-file-noselect test-dir) |
| 129 | (make-directory "test-subdir")) | 134 | (make-directory "test-subdir")) |
| @@ -158,6 +163,11 @@ | |||
| 158 | "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ." | 163 | "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ." |
| 159 | (let ((test-dir (make-temp-file "test-dir-" t)) | 164 | (let ((test-dir (make-temp-file "test-dir-" t)) |
| 160 | (dired-auto-revert-buffer t) buffers) | 165 | (dired-auto-revert-buffer t) buffers) |
| 166 | ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the | ||
| 167 | ;; corresponding long file names exist, otherwise such names trip | ||
| 168 | ;; string comparisons below. | ||
| 169 | (if (eq system-type 'windows-nt) | ||
| 170 | (setq test-dir (file-truename test-dir))) | ||
| 161 | (with-current-buffer (find-file-noselect test-dir) | 171 | (with-current-buffer (find-file-noselect test-dir) |
| 162 | (make-directory "test-subdir")) | 172 | (make-directory "test-subdir")) |
| 163 | (push (dired test-dir) buffers) | 173 | (push (dired test-dir) buffers) |