aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el23
1 files changed, 19 insertions, 4 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 50db55ebb4f..2670723ecdc 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2783,8 +2783,9 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
2783 (should-not (file-directory-p tmp-name1)) 2783 (should-not (file-directory-p tmp-name1))
2784 2784
2785 ;; Trashing directories works only since Emacs 27.1. It doesn't 2785 ;; Trashing directories works only since Emacs 27.1. It doesn't
2786 ;; work for crypted remote directories. 2786 ;; work for crypted remote directories and for ange-ftp.
2787 (when (and (not (tramp--test-crypt-p)) (tramp--test-emacs27-p)) 2787 (when (and (not (tramp--test-crypt-p)) (not (tramp--test-ftp-p))
2788 (tramp--test-emacs27-p))
2788 (let ((trash-directory (tramp--test-make-temp-name 'local quoted)) 2789 (let ((trash-directory (tramp--test-make-temp-name 'local quoted))
2789 (delete-by-moving-to-trash t)) 2790 (delete-by-moving-to-trash t))
2790 (make-directory trash-directory) 2791 (make-directory trash-directory)
@@ -2925,7 +2926,15 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
2925 '("bla" "foo"))) 2926 '("bla" "foo")))
2926 (should (equal (directory-files 2927 (should (equal (directory-files
2927 tmp-name1 'full directory-files-no-dot-files-regexp) 2928 tmp-name1 'full directory-files-no-dot-files-regexp)
2928 `(,tmp-name2 ,tmp-name3)))) 2929 `(,tmp-name2 ,tmp-name3)))
2930 ;; Check the COUNT arg. It exists since Emacs 28.
2931 (when (tramp--test-emacs28-p)
2932 (with-no-warnings
2933 (should
2934 (= 1 (length
2935 (directory-files
2936 tmp-name1 nil directory-files-no-dot-files-regexp
2937 nil 1)))))))
2929 2938
2930 ;; Cleanup. 2939 ;; Cleanup.
2931 (ignore-errors (delete-directory tmp-name1 'recursive)))))) 2940 (ignore-errors (delete-directory tmp-name1 'recursive))))))
@@ -3443,7 +3452,13 @@ They might differ only in time attributes or directory size."
3443 (file-attributes (car elt)) (cdr elt)))) 3452 (file-attributes (car elt)) (cdr elt))))
3444 3453
3445 (setq attr (directory-files-and-attributes tmp-name2 nil "\\`b")) 3454 (setq attr (directory-files-and-attributes tmp-name2 nil "\\`b"))
3446 (should (equal (mapcar #'car attr) '("bar" "boz")))) 3455 (should (equal (mapcar #'car attr) '("bar" "boz")))
3456
3457 ;; Check the COUNT arg. It exists since Emacs 28.
3458 (when (tramp--test-emacs28-p)
3459 (with-no-warnings
3460 (should (= 1 (length (directory-files-and-attributes
3461 tmp-name2 nil "\\`b" nil nil 1)))))))
3447 3462
3448 ;; Cleanup. 3463 ;; Cleanup.
3449 (ignore-errors (delete-directory tmp-name1 'recursive)))))) 3464 (ignore-errors (delete-directory tmp-name1 'recursive))))))