summary refs log tree commit diff
path: root/tests/scripts-build.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2016-10-19 10:54:36 -0400
committerMark H Weaver <mhw@netris.org>2016-10-19 10:54:36 -0400
commitd2478b4cdd6f1db44f4725b39489aca89d3d9180 (patch)
treebc4714453fd9b7a2e64fcd5f58c24d371dbb91d8 /tests/scripts-build.scm
parentc9a71c6fdab6914dd648b76c349c3af9018cad35 (diff)
parent152ffe7cb6ba02915d8645102e0f6dfeb639090d (diff)
downloadguix-d2478b4cdd6f1db44f4725b39489aca89d3d9180.tar.gz
Merge branch 'master' into core-updates
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)