aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts-build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts-build.scm')
-rw-r--r--tests/scripts-build.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm
index e48c8da264..b324012806 100644
--- a/tests/scripts-build.scm
+++ b/tests/scripts-build.scm
@@ -102,4 +102,23 @@
((("x" dep))
(eq? dep findutils)))))))))))
+(test-assert "options->transformation, with-graft"
+ (let* ((p (dummy-package "guix.scm"
+ (inputs `(("foo" ,grep)
+ ("bar" ,(dummy-package "chbouib"
+ (native-inputs `(("x" ,grep)))))))))
+ (t (options->transformation '((with-graft . "grep=findutils")))))
+ (with-store store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (match (package-inputs new)
+ ((("foo" dep1) ("bar" dep2))
+ (and (string=? (package-full-name dep1)
+ (package-full-name grep))
+ (eq? (package-replacement dep1) findutils)
+ (string=? (package-name dep2) "chbouib")
+ (match (package-native-inputs dep2)
+ ((("x" dep))
+ (eq? (package-replacement dep) findutils)))))))))))
+
(test-end)