aboutsummaryrefslogtreecommitdiff
path: root/tests/import-utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/import-utils.scm')
-rw-r--r--tests/import-utils.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index c3ab25d788..3400433bbb 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -24,7 +24,9 @@
#:use-module (guix packages)
#:use-module (guix build-system)
#:use-module (gnu packages)
- #:use-module (srfi srfi-64))
+ #:use-module (srfi srfi-41)
+ #:use-module (srfi srfi-64)
+ #:use-module (ice-9 match))
(test-begin "import-utils")
@@ -41,6 +43,27 @@
'license:lgpl2.0
(license->symbol license:lgpl2.0))
+(test-equal "recursive-import"
+ '((package ;package expressions in topological order
+ (name "bar"))
+ (package
+ (name "foo")
+ (inputs `(("bar" ,bar)))))
+ (stream->list
+ (recursive-import "foo" 'repo
+ #:repo->guix-package
+ (match-lambda*
+ (("foo" 'repo)
+ (values '(package
+ (name "foo")
+ (inputs `(("bar" ,bar))))
+ '("bar")))
+ (("bar" 'repo)
+ (values '(package
+ (name "bar"))
+ '())))
+ #:guix-name identity)))
+
(test-assert "alist->package with simple source"
(let* ((meta '(("name" . "hello")
("version" . "2.10")