aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat-28.el2
-rw-r--r--compat-tests.el5
2 files changed, 6 insertions, 1 deletions
diff --git a/compat-28.el b/compat-28.el
index b04b75c..fadbf7e 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -140,7 +140,7 @@ consider, and are interpreted as in `substring'."
;;;; Defined in dired.c
-(compat-defun directory-files (directory &optional full match nosort count) ;; <UNTESTED>
+(compat-defun directory-files (directory &optional full match nosort count) ;; <compat-tests:directory-files>
"Handle additional optional argument COUNT.
If COUNT is non-nil and a natural number, the function will
return COUNT number of file names (if so many are present)."
diff --git a/compat-tests.el b/compat-tests.el
index 08ea45e..95f0bef 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1126,6 +1126,11 @@
(should-not (equal dir default-directory))
(should (file-exists-p default-directory)))))
+(ert-deftest directory-files ()
+ (should-not (compat-call directory-files "." nil nil nil 0))
+ (should-equal 1 (length (compat-call directory-files "." nil nil nil 1)))
+ (should-equal 2 (length (compat-call directory-files "." nil nil nil 2))))
+
(ert-deftest directory-name-p ()
(should (directory-name-p "/"))
(should-not (directory-name-p "/file"))