diff options
| author | Michael Albinus | 2018-08-29 10:05:34 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-08-29 10:05:34 +0200 |
| commit | c252cd9d207ab8442f011630005e467ad118bd3a (patch) | |
| tree | 5e1989fc2cff344ab7234cd4121cc68381117b9c /test | |
| parent | 190e85b8d286408a88bb611967e658639c48d6c5 (diff) | |
| download | emacs-c252cd9d207ab8442f011630005e467ad118bd3a.tar.gz emacs-c252cd9d207ab8442f011630005e467ad118bd3a.zip | |
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.el | 5 |
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'." | |||
| 3219 | ;; `current-time'. Therefore, we use '(0 1). We skip the | 3219 | ;; `current-time'. Therefore, we use '(0 1). We skip the |
| 3220 | ;; test, if the remote handler is not able to set the | 3220 | ;; test, if the remote handler is not able to set the |
| 3221 | ;; correct time. | 3221 | ;; correct time. |
| 3222 | (skip-unless (set-file-times tmp-name1 '(0 1))) | 3222 | (skip-unless (set-file-times tmp-name1 (seconds-to-time 1))) |
| 3223 | ;; Dumb remote shells without perl(1) or stat(1) are not | 3223 | ;; Dumb remote shells without perl(1) or stat(1) are not |
| 3224 | ;; able to return the date correctly. They say "don't know". | 3224 | ;; able to return the date correctly. They say "don't know". |
| 3225 | (unless (equal (nth 5 (file-attributes tmp-name1)) '(0 0)) | 3225 | (unless (equal (nth 5 (file-attributes tmp-name1)) '(0 0)) |
| 3226 | (should (equal (nth 5 (file-attributes tmp-name1)) '(0 1))) | 3226 | (should |
| 3227 | (equal (nth 5 (file-attributes tmp-name1)) (seconds-to-time 1))) | ||
| 3227 | (write-region "bla" nil tmp-name2) | 3228 | (write-region "bla" nil tmp-name2) |
| 3228 | (should (file-exists-p tmp-name2)) | 3229 | (should (file-exists-p tmp-name2)) |
| 3229 | (should (file-newer-than-file-p tmp-name2 tmp-name1)) | 3230 | (should (file-newer-than-file-p tmp-name2 tmp-name1)) |