[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-82-ga2c660
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-82-ga2c6601 |
Date: |
Mon, 19 Dec 2011 21:25:34 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=a2c66014cf4b8799812e45eedbb9b1a2c61236b0
The branch, stable-2.0 has been updated
via a2c66014cf4b8799812e45eedbb9b1a2c61236b0 (commit)
from 52b680f85e84689778f10ed8f9e72adf8316fbe7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a2c66014cf4b8799812e45eedbb9b1a2c61236b0
Author: Ludovic Courtès <address@hidden>
Date: Mon Dec 19 22:25:30 2011 +0100
ftw: Include sub-directories in the result of `scandir'.
* module/ice-9/ftw.scm (scandir)[skip]: Keep NAME in the resulting list.
* test-suite/tests/ftw.test ("scandir")["top-srcdir"]: New test.
-----------------------------------------------------------------------
Summary of changes:
module/ice-9/ftw.scm | 2 +-
test-suite/tests/ftw.test | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/module/ice-9/ftw.scm b/module/ice-9/ftw.scm
index eed3eeb..5f61154 100644
--- a/module/ice-9/ftw.scm
+++ b/module/ice-9/ftw.scm
@@ -530,7 +530,7 @@ of file names is sorted according to ENTRY<?, which
defaults to
(define (skip name stat result)
;; All the sub-directories are skipped.
- result)
+ (cons (basename name) result))
(and=> (file-system-fold enter? leaf down up skip #f name stat)
(lambda (files)
diff --git a/test-suite/tests/ftw.test b/test-suite/tests/ftw.test
index 41c731a..fa179d4 100644
--- a/test-suite/tests/ftw.test
+++ b/test-suite/tests/ftw.test
@@ -169,6 +169,18 @@
(with-test-prefix "scandir"
+ (pass-if "top-srcdir"
+ (let ((valid? (negate (cut string-any #\/ <>))))
+ (match (scandir %top-srcdir)
+ (((? valid? files) ...)
+ ;; Both subdirs and files must be included.
+ (let ((expected '("libguile" "README" "COPYING"
+ "test-suite" "Makefile.am"
+ "." "..")))
+ (lset= string=?
+ (lset-intersection string=? files expected)
+ expected))))))
+
(pass-if "test-suite"
(let ((select? (cut string-suffix? ".test" <>)))
(match (scandir (string-append %test-dir "/tests") select?)
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-82-ga2c6601,
Ludovic Courtès <=