aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-02-21 11:43:49 +0100
committerMichael Albinus2014-02-21 11:43:49 +0100
commitc6e08d12a9c9c2e56a90e1194988cd801ccd4553 (patch)
tree301deb005dd6e449cfd241aa29d3efe4f7de96b9
parent037f36e52c3bc841904e646716cfe3fbb5124270 (diff)
downloademacs-c6e08d12a9c9c2e56a90e1194988cd801ccd4553.tar.gz
emacs-c6e08d12a9c9c2e56a90e1194988cd801ccd4553.zip
* automated/tramp-tests.el
(tramp-test19-directory-files-and-attributes): Do not include directories in comparison; they might have changed their timestamps already.
-rw-r--r--test/ChangeLog7
-rw-r--r--test/automated/tramp-tests.el16
2 files changed, 18 insertions, 5 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 67b83444e8f..cf246b7eda9 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
12014-02-21 Michael Albinus <michael.albinus@gmx.de>
2
3 * automated/tramp-tests.el
4 (tramp-test19-directory-files-and-attributes): Do not include
5 directories in comparison; they might have changed their
6 timestamps already.
7
12014-02-20 Michael Albinus <michael.albinus@gmx.de> 82014-02-20 Michael Albinus <michael.albinus@gmx.de>
2 9
3 * automated/tramp-tests.el (tramp--instrument-test-case): New macro. 10 * automated/tramp-tests.el (tramp--instrument-test-case): New macro.
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index 374eba7c213..d93fc78f86c 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -906,13 +906,19 @@ This tests also `file-readable-p' and `file-regular-p'."
906 (setq attr (directory-files-and-attributes tmp-name)) 906 (setq attr (directory-files-and-attributes tmp-name))
907 (should (consp attr)) 907 (should (consp attr))
908 (dolist (elt attr) 908 (dolist (elt attr)
909 (should 909 ;; We cannot include "." and "..". They might have
910 (equal (file-attributes (expand-file-name (car elt) tmp-name)) 910 ;; changed their timestamp already.
911 (cdr elt)))) 911 (when (string-match "foo$\\|bar$\\|baz$" (car elt))
912 (should
913 (equal (file-attributes (expand-file-name (car elt) tmp-name))
914 (cdr elt)))))
912 (setq attr (directory-files-and-attributes tmp-name 'full)) 915 (setq attr (directory-files-and-attributes tmp-name 'full))
913 (dolist (elt attr) 916 (dolist (elt attr)
914 (should 917 ;; We cannot include "." and "..". They might have
915 (equal (file-attributes (car elt)) (cdr elt)))) 918 ;; changed their timestamp already.
919 (when (string-match "foo$\\|bar$\\|baz$" (car elt))
920 (should
921 (equal (file-attributes (car elt)) (cdr elt)))))
916 (setq attr (directory-files-and-attributes tmp-name nil "^b")) 922 (setq attr (directory-files-and-attributes tmp-name nil "^b"))
917 (should (equal (mapcar 'car attr) '("bar" "boz")))) 923 (should (equal (mapcar 'car attr) '("bar" "boz"))))
918 (ignore-errors (delete-directory tmp-name 'recursive)))))) 924 (ignore-errors (delete-directory tmp-name 'recursive))))))