diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/git.scm | 3 | ||||
-rw-r--r-- | tests/packages.scm | 24 |
2 files changed, 25 insertions, 2 deletions
diff --git a/tests/git.scm b/tests/git.scm index 4a806abcc3..aa4f03ca62 100644 --- a/tests/git.scm +++ b/tests/git.scm @@ -119,8 +119,7 @@ (list commit3 commit4)) (lset= eq? (commit-difference commit4 commit1 (list commit3)) (list commit4)) - (lset= eq? (commit-difference commit4 commit1 (list commit5)) - (list commit2 commit3 commit4))))))) + (null? (commit-difference commit4 commit1 (list commit5)))))))) (unless (which (git-command)) (test-skip 1)) (test-equal "commit-relation" diff --git a/tests/packages.scm b/tests/packages.scm index 72e87dbfb7..c7b6f669b5 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -900,6 +900,30 @@ (replacement #f)))) (replacement (package-derivation %store new))))))) +(test-assert "package-grafts, dependency on several outputs" + ;; Make sure we get one graft per output; see <https://bugs.gnu.org/41796>. + (letrec* ((p0 (dummy-package "p0" + (version "1.0") + (replacement p0*) + (arguments '(#:implicit-inputs? #f)) + (outputs '("out" "lib")))) + (p0* (package (inherit p0) (version "1.1"))) + (p1 (dummy-package "p1" + (arguments '(#:implicit-inputs? #f)) + (inputs `(("p0" ,p0) + ("p0:lib" ,p0 "lib")))))) + (lset= equal? (pk (package-grafts %store p1)) + (list (graft + (origin (package-derivation %store p0)) + (origin-output "out") + (replacement (package-derivation %store p0*)) + (replacement-output "out")) + (graft + (origin (package-derivation %store p0)) + (origin-output "lib") + (replacement (package-derivation %store p0*)) + (replacement-output "lib")))))) + (test-assert "replacement also grafted" ;; We build a DAG as below, where dotted arrows represent replacements and ;; solid arrows represent dependencies: |