From: Michael Albinus Date: Fri, 30 Aug 2019 11:54:42 +0000 (+0200) Subject: Extend tramp--test-check-files (Bug#37228) X-Git-Tag: emacs-27.0.90~1328^2~34 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d09a1d66c608e9e993ce73515cf83f785d04e407;p=emacs.git 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) --- diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 5767551e326..0d37d0763f7 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -5153,7 +5153,8 @@ This requires restrictions of file name syntax." (tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name 'local quoted)) (files (delq nil files)) - (process-environment process-environment)) + (process-environment process-environment) + (sorted-files (sort (copy-sequence files) #'string-lessp))) (unwind-protect (progn (make-directory tmp-name1) @@ -5200,10 +5201,20 @@ This requires restrictions of file name syntax." ;; Check file names. (should (equal (directory-files tmp-name1 nil directory-files-no-dot-files-regexp) - (sort (copy-sequence files) #'string-lessp))) + sorted-files)) (should (equal (directory-files 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 ;; values. For `adb', there could be strange file