emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat 9b787ec578 3/6: Add test for directory-files


From: ELPA Syncer
Subject: [elpa] externals/compat 9b787ec578 3/6: Add test for directory-files
Date: Mon, 16 Jan 2023 06:57:26 -0500 (EST)

branch: externals/compat
commit 9b787ec578e3526b74db984c197c39dc06dca3ee
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add test for directory-files
---
 compat-28.el    | 2 +-
 compat-tests.el | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/compat-28.el b/compat-28.el
index b04b75c3ed..fadbf7e3b7 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 08ea45ed23..95f0bef531 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"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]