Skip to content
Snippets Groups Projects
Commit 58cbbe4b authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

tests: 'topologically-sorted' test handles different references orders.

* tests/store.scm ("topologically-sorted, more difficult"): Arrange to
  handle a different ordering of (references %store y).
parent 220193ad
No related branches found
No related tags found
No related merge requests found
......@@ -190,9 +190,18 @@ (define (same? x y)
(s1 (topologically-sorted %store (list y)))
(s2 (topologically-sorted %store (list c y)))
(s3 (topologically-sorted %store (cons y (references %store y)))))
(and (equal? s1 (list w x a b c d y))
(equal? s2 (list a b c w x d y))
(lset= string=? s1 s3))))
;; The order in which 'references' returns the references of Y is
;; unspecified, so accommodate.
(let* ((x-then-d? (equal? (references %store y) (list x d))))
(and (equal? s1
(if x-then-d?
(list w x a b c d y)
(list a b c d w x y)))
(equal? s2
(if x-then-d?
(list a b c w x d y)
(list a b c d w x y)))
(lset= string=? s1 s3)))))
(test-assert "log-file, derivation"
(let* ((b (add-text-to-store %store "build" "echo $foo > $out" '()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment