]> git.eshelyaron.com Git - emacs.git/commitdiff
* automated/tramp-tests.el
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 21 Feb 2014 10:43:49 +0000 (11:43 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 21 Feb 2014 10:43:49 +0000 (11:43 +0100)
(tramp-test19-directory-files-and-attributes): Do not include
directories in comparison; they might have changed their
timestamps already.

test/ChangeLog
test/automated/tramp-tests.el

index 67b83444e8fe88a14f7fd7f9bb4b544f324f5009..cf246b7eda95b00da998993f77437c43d1dd388a 100644 (file)
@@ -1,3 +1,10 @@
+2014-02-21  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/tramp-tests.el
+       (tramp-test19-directory-files-and-attributes): Do not include
+       directories in comparison; they might have changed their
+       timestamps already.
+
 2014-02-20  Michael Albinus  <michael.albinus@gmx.de>
 
        * automated/tramp-tests.el (tramp--instrument-test-case): New macro.
index 374eba7c213069d717d88902d51045c8d82b561e..d93fc78f86c89e832408e8b1ec483592d2ecb670 100644 (file)
@@ -906,13 +906,19 @@ This tests also `file-readable-p' and `file-regular-p'."
          (setq attr (directory-files-and-attributes tmp-name))
          (should (consp attr))
          (dolist (elt attr)
-           (should
-            (equal (file-attributes (expand-file-name (car elt) tmp-name))
-                   (cdr elt))))
+           ;; We cannot include "." and "..".  They might have
+           ;; changed their timestamp already.
+           (when (string-match "foo$\\|bar$\\|baz$" (car elt))
+             (should
+              (equal (file-attributes (expand-file-name (car elt) tmp-name))
+                     (cdr elt)))))
          (setq attr (directory-files-and-attributes tmp-name 'full))
          (dolist (elt attr)
-           (should
-            (equal (file-attributes (car elt)) (cdr elt))))
+           ;; We cannot include "." and "..".  They might have
+           ;; changed their timestamp already.
+           (when (string-match "foo$\\|bar$\\|baz$" (car elt))
+             (should
+              (equal (file-attributes (car elt)) (cdr elt)))))
          (setq attr (directory-files-and-attributes tmp-name nil "^b"))
          (should (equal (mapcar 'car attr) '("bar" "boz"))))
       (ignore-errors (delete-directory tmp-name 'recursive))))))