From d09a1d66c608e9e993ce73515cf83f785d04e407 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 30 Aug 2019 13:54:42 +0200 Subject: [PATCH] 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) --- test/lisp/net/tramp-tests.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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 -- 2.39.2