From c6e08d12a9c9c2e56a90e1194988cd801ccd4553 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 21 Feb 2014 11:43:49 +0100 Subject: [PATCH] * automated/tramp-tests.el (tramp-test19-directory-files-and-attributes): Do not include directories in comparison; they might have changed their timestamps already. --- test/ChangeLog | 7 +++++++ test/automated/tramp-tests.el | 16 +++++++++++----- 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 @@ +2014-02-21 Michael Albinus + + * 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 * 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'." (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)))))) -- 2.11.4.GIT