emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116990: * automated/tramp-tests.el (tramp-test19


From: Michael Albinus
Subject: [Emacs-diffs] emacs-24 r116990: * automated/tramp-tests.el (tramp-test19-directory-files-and-attributes)
Date: Sun, 20 Apr 2014 21:39:46 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116990
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-04-20 23:39:43 +0200
message:
  * automated/tramp-tests.el (tramp-test19-directory-files-and-attributes)
  (tramp-test22-file-times): Check for `file-attributes' equality
  only if there is a usable timestamp.
  (tramp--test-check-files): Do not use `copy-sequence'.
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/tramp-tests.el  tramptests.el-20131105142319-d9zp3oprkpxj5v1e-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2014-04-19 14:14:26 +0000
+++ b/test/ChangeLog    2014-04-20 21:39:43 +0000
@@ -1,3 +1,11 @@
+2014-04-20  Michael Albinus  <address@hidden>
+
+       * automated/tramp-tests.el
+       (tramp-test19-directory-files-and-attributes)
+       (tramp-test22-file-times): Check for `file-attributes' equality
+       only if there is a usable timestamp.
+       (tramp--test-check-files): Do not use `copy-sequence'.
+
 2014-04-19  Michael Albinus  <address@hidden>
 
        * automated/tramp-tests.el (tramp--test-check-files): Extend test.

=== modified file 'test/automated/tramp-tests.el'
--- a/test/automated/tramp-tests.el     2014-04-19 21:05:30 +0000
+++ b/test/automated/tramp-tests.el     2014-04-20 21:39:43 +0000
@@ -1012,14 +1012,22 @@
          (write-region "boz" nil (expand-file-name "boz" tmp-name2))
          (setq attr (directory-files-and-attributes tmp-name2))
          (should (consp attr))
+         ;; Dumb remote shells without perl(1) or stat(1) are not
+         ;; able to return the date correctly.  They say "don't know".
          (dolist (elt attr)
-           (should
-            (equal (file-attributes (expand-file-name (car elt) tmp-name2))
-                   (cdr elt))))
+           (unless
+               (equal
+                (nth 5
+                     (file-attributes (expand-file-name (car elt) tmp-name2)))
+                '(0 0))
+             (should
+              (equal (file-attributes (expand-file-name (car elt) tmp-name2))
+                     (cdr elt)))))
          (setq attr (directory-files-and-attributes tmp-name2 'full))
          (dolist (elt attr)
-           (should
-            (equal (file-attributes (car elt)) (cdr elt))))
+           (unless (equal (nth 5 (file-attributes (car elt))) '(0 0))
+             (should
+              (equal (file-attributes (car elt)) (cdr elt)))))
          (setq attr (directory-files-and-attributes tmp-name2 nil "^b"))
          (should (equal (mapcar 'car attr) '("bar" "boz"))))
       (ignore-errors (delete-directory tmp-name1 'recursive)))))
@@ -1142,16 +1150,16 @@
          ;; We skip the test, if the remote handler is not able to
          ;; set the correct time.
          (skip-unless (set-file-times tmp-name1 '(0 1)))
-         ;; Dumb busyboxes are not able to return the date correctly.
-         ;; They say "don't know.
-         (skip-unless (not (equal (nth 5 (file-attributes tmp-name1)) '(0 0))))
-         (should (equal (nth 5 (file-attributes tmp-name1)) '(0 1)))
-         (write-region "bla" nil tmp-name2)
-         (should (file-exists-p tmp-name2))
-         (should (file-newer-than-file-p tmp-name2 tmp-name1))
-         ;; `tmp-name3' does not exist.
-         (should (file-newer-than-file-p tmp-name2 tmp-name3))
-         (should-not (file-newer-than-file-p tmp-name3 tmp-name1)))
+         ;; Dumb remote shells without perl(1) or stat(1) are not
+         ;; able to return the date correctly.  They say "don't know".
+         (unless (equal (nth 5 (file-attributes tmp-name1)) '(0 0))
+           (should (equal (nth 5 (file-attributes tmp-name1)) '(0 1)))
+           (write-region "bla" nil tmp-name2)
+           (should (file-exists-p tmp-name2))
+           (should (file-newer-than-file-p tmp-name2 tmp-name1))
+           ;; `tmp-name3' does not exist.
+           (should (file-newer-than-file-p tmp-name2 tmp-name3))
+           (should-not (file-newer-than-file-p tmp-name3 tmp-name1))))
       (ignore-errors
        (delete-file tmp-name1)
        (delete-file tmp-name2)))))
@@ -1447,7 +1455,7 @@
                         (sort (copy-sequence files) 'string-lessp)))
          (should (equal (directory-files
                          tmp-name2 nil directory-files-no-dot-files-regexp)
-                        (sort (copy-sequence files) 'string-lessp))))
+                        (sort files 'string-lessp))))
       (ignore-errors (delete-directory tmp-name1 'recursive))
       (ignore-errors (delete-directory tmp-name2 'recursive))))))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]