summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2018-08-29 10:05:34 +0200
committerMichael Albinus <michael.albinus@gmx.de>2018-08-29 10:05:34 +0200
commitc252cd9d207ab8442f011630005e467ad118bd3a (patch)
tree5e1989fc2cff344ab7234cd4121cc68381117b9c /test
parent190e85b8d286408a88bb611967e658639c48d6c5 (diff)
downloademacs-c252cd9d207ab8442f011630005e467ad118bd3a.tar.gz
Improve tramp-convert-file-attributes backward compatibility
* lisp/net/tramp-sh.el (tramp-convert-file-attributes): Use `seconds-to-time' for {access, modification, status change} time. Simplify check for inode. * test/lisp/net/tramp-tests.el (tramp-test22-file-times): Use `seconds-to-time'.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 293a0054560..55884f30a7e 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3219,11 +3219,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
;; `current-time'. Therefore, we use '(0 1). 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)))
+ (skip-unless (set-file-times tmp-name1 (seconds-to-time 1)))
;; 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)))
+ (should
+ (equal (nth 5 (file-attributes tmp-name1)) (seconds-to-time 1)))
(write-region "bla" nil tmp-name2)
(should (file-exists-p tmp-name2))
(should (file-newer-than-file-p tmp-name2 tmp-name1))