aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2025-07-30 09:33:20 +0200
committerMichael Albinus2025-07-30 09:33:20 +0200
commit4516091fd8314c811c090d90e6aad64779554d34 (patch)
tree7d0e27757672b5a33ad3e388a07c0ce6d046c398 /test
parentedd1f0512f4a057c19b7b26d811da574c025b02f (diff)
downloademacs-4516091fd8314c811c090d90e6aad64779554d34.tar.gz
emacs-4516091fd8314c811c090d90e6aad64779554d34.zip
Fix problem in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes): Use `directory-file-name'. * test/lisp/net/tramp-tests.el (tramp-test18-file-attributes) (tramp-test19-directory-files-and-attributes): Extend tests.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index acfc64a7690..d0ce17d2497 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3902,7 +3902,11 @@ This tests also `access-file', `file-readable-p',
3902 (when test-file-ownership-preserved-p 3902 (when test-file-ownership-preserved-p
3903 (should (file-ownership-preserved-p tmp-name1 'group))) 3903 (should (file-ownership-preserved-p tmp-name1 'group)))
3904 (setq attr (file-attributes tmp-name1)) 3904 (setq attr (file-attributes tmp-name1))
3905 (should (eq (file-attribute-type attr) t))) 3905 (should (eq (file-attribute-type attr) t))
3906 ;; A trailing slash shouldn't harm.
3907 (should
3908 (equal (file-attributes tmp-name1)
3909 (file-attributes (file-name-as-directory tmp-name1)))))
3906 3910
3907 ;; Cleanup. 3911 ;; Cleanup.
3908 (ignore-errors (delete-directory tmp-name1 'recursive)) 3912 (ignore-errors (delete-directory tmp-name1 'recursive))
@@ -4138,7 +4142,12 @@ They might differ only in time attributes or directory size."
4138 ;; Check the COUNT arg. 4142 ;; Check the COUNT arg.
4139 (setq attr (directory-files-and-attributes 4143 (setq attr (directory-files-and-attributes
4140 tmp-name2 nil (rx bos "b") nil nil 1)) 4144 tmp-name2 nil (rx bos "b") nil nil 1))
4141 (should (equal (mapcar #'car attr) '("bar")))) 4145 (should (equal (mapcar #'car attr) '("bar")))
4146
4147 ;; A trailing slash shouldn't harm.
4148 (should
4149 (equal (file-attributes tmp-name2)
4150 (file-attributes (file-name-as-directory tmp-name2)))))
4142 4151
4143 ;; Cleanup. 4152 ;; Cleanup.
4144 (ignore-errors (delete-directory tmp-name1 'recursive)))))) 4153 (ignore-errors (delete-directory tmp-name1 'recursive))))))