diff options
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm index 2b14a4af0a..49729b2e36 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -388,6 +388,16 @@ (s (topologically-sorted %store (list d)))) (equal? s (list a b c d)))) +(test-assert "topologically-sorted, one item, cutting" + (let* ((a (add-text-to-store %store "a" "a")) + (b (add-text-to-store %store "b" "b" (list a))) + (c (add-text-to-store %store "c" "c" (list b))) + (d (add-text-to-store %store "d" "d" (list c))) + (s (topologically-sorted %store (list d) + #:cut? + (cut string-suffix? "-b" <>)))) + (equal? s (list c d)))) + (test-assert "topologically-sorted, several items" (let* ((a (add-text-to-store %store "a" "a")) (b (add-text-to-store %store "b" "b" (list a))) |