Commit d09a1d66 authored by Michael Albinus's avatar Michael Albinus

Extend tramp--test-check-files (Bug#37228)

* test/lisp/net/tramp-tests.el (tramp--test-check-files): Test also
`directory-files-and-attributes'.  (Bug#37228)
parent cea78adf
Pipeline #3011 passed with stage
in 57 minutes and 8 seconds
...@@ -5153,7 +5153,8 @@ This requires restrictions of file name syntax." ...@@ -5153,7 +5153,8 @@ This requires restrictions of file name syntax."
(tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (tramp--test-make-temp-name 'local quoted)) (tmp-name2 (tramp--test-make-temp-name 'local quoted))
(files (delq nil files)) (files (delq nil files))
(process-environment process-environment)) (process-environment process-environment)
(sorted-files (sort (copy-sequence files) #'string-lessp)))
(unwind-protect (unwind-protect
(progn (progn
(make-directory tmp-name1) (make-directory tmp-name1)
...@@ -5200,10 +5201,20 @@ This requires restrictions of file name syntax." ...@@ -5200,10 +5201,20 @@ This requires restrictions of file name syntax."
;; Check file names. ;; Check file names.
(should (equal (directory-files (should (equal (directory-files
tmp-name1 nil directory-files-no-dot-files-regexp) tmp-name1 nil directory-files-no-dot-files-regexp)
(sort (copy-sequence files) #'string-lessp))) sorted-files))
(should (equal (directory-files (should (equal (directory-files
tmp-name2 nil directory-files-no-dot-files-regexp) tmp-name2 nil directory-files-no-dot-files-regexp)
(sort (copy-sequence files) #'string-lessp))) sorted-files))
(should (equal (mapcar
#'car
(directory-files-and-attributes
tmp-name1 nil directory-files-no-dot-files-regexp))
sorted-files))
(should (equal (mapcar
#'car
(directory-files-and-attributes
tmp-name2 nil directory-files-no-dot-files-regexp))
sorted-files))
;; `substitute-in-file-name' could return different ;; `substitute-in-file-name' could return different
;; values. For `adb', there could be strange file ;; values. For `adb', there could be strange file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment