aboutsummaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-06-20 23:51:00 +0200
committerLudovic Courtès <ludo@gnu.org>2013-06-20 23:51:00 +0200
commitd501fad11cfbd69245a4d5e2d632a0ab37985b55 (patch)
tree4d5a347efb3a5476937b21cb5bdb26204aaeea0c /tests/store.scm
parent4db00e42109b6f8229259859deac35499eec9004 (diff)
parentf3211ef3868326e3cec5318bc799a2ff6572741b (diff)
downloadpatches-d501fad11cfbd69245a4d5e2d632a0ab37985b55.tar
patches-d501fad11cfbd69245a4d5e2d632a0ab37985b55.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/packages/make-bootstrap.scm
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm
index c0126ce335..b42bc97017 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -106,6 +106,24 @@
(null? (references %store t1))
(null? (referrers %store t2)))))
+(test-assert "requisites"
+ (let* ((t1 (add-text-to-store %store "random1"
+ (random-text) '()))
+ (t2 (add-text-to-store %store "random2"
+ (random-text) (list t1)))
+ (t3 (add-text-to-store %store "random3"
+ (random-text) (list t2)))
+ (t4 (add-text-to-store %store "random4"
+ (random-text) (list t1 t3))))
+ (define (same? x y)
+ (and (= (length x) (length y))
+ (lset= equal? x y)))
+
+ (and (same? (requisites %store t1) (list t1))
+ (same? (requisites %store t2) (list t1 t2))
+ (same? (requisites %store t3) (list t1 t2 t3))
+ (same? (requisites %store t4) (list t1 t2 t3 t4)))))
+
(test-assert "derivers"
(let* ((b (add-text-to-store %store "build" "echo $foo > $out" '()))
(s (add-to-store %store "bash" #t "sha256"