* automated/tramp-tests.el
(tramp-test19-directory-files-and-attributes): Do not include directories in comparison; they might have changed their timestamps already.
This commit is contained in:
parent
037f36e52c
commit
c6e08d12a9
2 changed files with 18 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue