ftw: Add `scandir'.
Suggested by Nala Ginrut <nalaginrut@gmail.com>.
* module/ice-9/ftw.scm (scandir): New procedure.
* test-suite/tests/ftw.test ("scandir"): New test prefix.
* doc/ref/misc-modules.texi (File Tree Walk): Document `scandir'.
This commit is contained in:
parent
af98fafabf
commit
1629429d63
3 changed files with 51 additions and 1 deletions
|
|
@ -166,3 +166,11 @@
|
|||
expected)))
|
||||
(_ #f))
|
||||
children)))))
|
||||
|
||||
(with-test-prefix "scandir"
|
||||
|
||||
(pass-if "test-suite"
|
||||
(let ((select? (cut string-suffix? ".test" <>)))
|
||||
(match (scandir (string-append %test-dir "/tests") select?)
|
||||
(("." ".." "00-initial-env.test" (? select?) ...)
|
||||
#t)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue