aboutsummaryrefslogtreecommitdiff
path: root/tests/graph.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/graph.scm')
-rw-r--r--tests/graph.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/graph.scm b/tests/graph.scm
index ad8aea0ada..04c6e74279 100644
--- a/tests/graph.scm
+++ b/tests/graph.scm
@@ -250,6 +250,17 @@ edges."
(bootstrap? package)))
diff))))))))
+(test-assert "node-transitive-edges, no duplicates"
+ (run-with-store %store
+ (let* ((p0 (dummy-package "p0"))
+ (p1a (dummy-package "p1a" (inputs `(("p0" ,p0)))))
+ (p1b (dummy-package "p1b" (inputs `(("p0" ,p0)))))
+ (p2 (dummy-package "p2" (inputs `(("p1a" ,p1a) ("p1b" ,p1b))))))
+ (mlet %store-monad ((edges (node-edges %package-node-type
+ (list p2 p1a p1b p0))))
+ (return (lset= eq? (node-transitive-edges (list p2) edges)
+ (list p1a p1b p0)))))))
+
(test-end "graph")