summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/grafts.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/grafts.scm b/tests/grafts.scm
index 4a4122a3e9..9fe314d183 100644
--- a/tests/grafts.scm
+++ b/tests/grafts.scm
@@ -75,6 +75,26 @@
(string=? (readlink (string-append graft "/sh")) one)
(string=? (readlink (string-append graft "/self")) graft))))))
+(test-assert "graft-derivation, multiple outputs"
+ (let* ((build `(begin
+ (symlink (assoc-ref %build-inputs "a")
+ (assoc-ref %outputs "one"))
+ (symlink (assoc-ref %outputs "one")
+ (assoc-ref %outputs "two"))))
+ (orig (build-expression->derivation %store "grafted" build
+ #:inputs `(("a" ,%bash))
+ #:outputs '("one" "two")))
+ (repl (add-text-to-store %store "bash" "fake bash"))
+ (grafted (graft-derivation %store orig
+ (list (graft
+ (origin %bash)
+ (replacement repl))))))
+ (and (build-derivations %store (list grafted))
+ (let ((one (derivation->output-path grafted "one"))
+ (two (derivation->output-path grafted "two")))
+ (and (string=? (readlink one) repl)
+ (string=? (readlink two) one))))))
+
(test-end)