+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.
(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))))))