Commit c6e08d12 authored by Michael Albinus's avatar Michael Albinus
Browse files

* automated/tramp-tests.el

(tramp-test19-directory-files-and-attributes): Do not include
directories in comparison; they might have changed their
timestamps already.
parent 037f36e5
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.
......
......@@ -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))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment