[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"))
- [elpa] externals/compat updated (0967dbf2de -> 9600545c54), ELPA Syncer, 2023/01/16
- [elpa] externals/compat 425156ccb4 2/6: compat-macs: Rename :cond to :when, ELPA Syncer, 2023/01/16
- [elpa] externals/compat 9097878541 4/6: null-device: Use file-remote-p, ELPA Syncer, 2023/01/16
- [elpa] externals/compat 9b787ec578 3/6: Add test for directory-files,
ELPA Syncer <=
- [elpa] externals/compat 0a56ae09cd 1/6: compat-macs: Expand docstring, ELPA Syncer, 2023/01/16
- [elpa] externals/compat 9600545c54 6/6: Add test for temporary-file-directory, ELPA Syncer, 2023/01/16
- [elpa] externals/compat 99878885e3 5/6: compat-28: Drop null-device, ELPA Syncer, 2023/01/16