aboutsummaryrefslogtreecommitdiff
path: root/tests/discovery.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-07-10 14:37:53 -0400
committerLeo Famulari <leo@famulari.name>2017-07-10 14:37:53 -0400
commitc8eb2b8c60d954b4522555a5c75b7bb4be5a1a4d (patch)
tree3a2e569e333ccd9265237868d3f46b2d1e04e3a9 /tests/discovery.scm
parentad22c7185395a52bd90ea5890a2ac79f44d00352 (diff)
parent61adfb00b11cc16a70e60f19fd8e0a838a3ef608 (diff)
downloadpatches-c8eb2b8c60d954b4522555a5c75b7bb4be5a1a4d.tar
patches-c8eb2b8c60d954b4522555a5c75b7bb4be5a1a4d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/discovery.scm')
-rw-r--r--tests/discovery.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/discovery.scm b/tests/discovery.scm
index 04de83f085..753e6a8979 100644
--- a/tests/discovery.scm
+++ b/tests/discovery.scm
@@ -19,6 +19,7 @@
(define-module (test-discovery)
#:use-module (guix discovery)
#:use-module (guix build-system)
+ #:use-module (guix utils)
#:use-module (srfi srfi-64)
#:use-module (ice-9 match))
@@ -32,6 +33,19 @@
((('guix 'import _ ...) ..1)
#t)))
+(test-assert "scheme-modules recurses in symlinks to directories"
+ (call-with-temporary-directory
+ (lambda (directory)
+ (mkdir (string-append directory "/guix"))
+ (symlink (string-append %top-srcdir "/guix/import")
+ (string-append directory "/guix/import"))
+
+ ;; DIRECTORY/guix/import is a symlink but we want to make sure
+ ;; 'scheme-modules' recurses into it.
+ (match (map module-name (scheme-modules directory))
+ ((('guix 'import _ ...) ..1)
+ #t)))))
+
(test-equal "scheme-modules, non-existent directory"
'()
(scheme-modules "/does/not/exist"))