emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 21375a2: Fix some dired-tests.el on MS-Windows


From: Eli Zaretskii
Subject: [Emacs-diffs] master 21375a2: Fix some dired-tests.el on MS-Windows
Date: Tue, 1 Aug 2017 10:46:24 -0400 (EDT)

branch: master
commit 21375a29ac9700810b90a34bd9825b1ca8f0c8e6
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 test/lisp/dired-tests.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 5900fea..8657910 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -124,6 +124,11 @@
   "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#5 ."
   (let ((test-dir (file-name-as-directory (make-temp-file "test-dir-" t)))
         (dired-auto-revert-buffer t) buffers)
+    ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the
+    ;; corresponding long file names exist, otherwise such names trip
+    ;; dired-buffers-for-dir.
+    (if (eq system-type 'windows-nt)
+        (setq test-dir (file-truename test-dir)))
     (should-not (dired-buffers-for-dir test-dir))
     (with-current-buffer (find-file-noselect test-dir)
       (make-directory "test-subdir"))
@@ -158,6 +163,11 @@
   "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ."
   (let ((test-dir (make-temp-file "test-dir-" t))
         (dired-auto-revert-buffer t) buffers)
+    ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the
+    ;; corresponding long file names exist, otherwise such names trip
+    ;; string comparisons below.
+    (if (eq system-type 'windows-nt)
+        (setq test-dir (file-truename test-dir)))
     (with-current-buffer (find-file-noselect test-dir)
       (make-directory "test-subdir"))
     (push (dired test-dir) buffers)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]