]> git.eshelyaron.com Git - emacs.git/commitdiff
Refine expectations for dired-compress-handler test
authorNoam Postavsky <npostavs@gmail.com>
Sun, 28 Jan 2018 08:47:45 +0000 (03:47 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 28 Jan 2018 12:26:31 +0000 (07:26 -0500)
* test/lisp/files-tests.el
(files-file-name-non-special-dired-compress-handler): Skip if regular
file name contains ":" (e.g., on windows-nt).

test/lisp/files-tests.el

index 7fc5108b08e4dfbe2d56ae2fc49c226f90bd9510..56bef247e7e97247e83285af1a116be544871296 100644 (file)
@@ -348,16 +348,14 @@ be invoked with the right arguments."
 
 (ert-deftest files-file-name-non-special-dired-compress-handler ()
   ;; `dired-compress-file' can get confused by filenames with ":" in
-  ;; them, which causes this to fail on `windows-nt' systems.  This
-  ;; test does seem to pass on GNU/Linux systems, but it's not clear
-  ;; why since the "/:" quoted file names also have ":" in them.  Just
-  ;; skip for now.
-  (ert-skip "FIXME: dired-compress-file unreliable for names containing `:'." )
-  (files-tests--with-temp-file tmpfile
-    (let* ((nospecial (concat "/:" tmpfile))
-           (compressed (dired-compress-file nospecial)))
+  ;; them, which causes this to fail on `windows-nt' systems.
+  (when (string-match-p ":" (expand-file-name temporary-file-directory))
+    (ert-skip "FIXME: `dired-compress-file' unreliable when filenames contain `:'."))
+  (files-tests--with-temp-non-special (tmpfile nospecial)
+    (let ((compressed (dired-compress-file nospecial)))
       (when compressed
-        (should (equal nospecial (dired-compress-file compressed)))))))
+        ;; FIXME: Should it return a still-quoted name?
+        (should (file-equal-p nospecial (dired-compress-file compressed)))))))
 
 (ert-deftest files-file-name-non-special-handlers ()
   (files-tests--with-temp-file tmpfile