diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/store.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm index 3932a8eb45..90137b9754 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -147,6 +147,18 @@ ;; (valid-path? %store p1) ;; (member (pk p2) (live-paths %store))))) +(test-assert "permanent root" + (let* ((p (with-store store + (let ((p (add-text-to-store store "random-text" + (random-text)))) + (add-permanent-root p) + (add-permanent-root p) ; should not throw + p)))) + (and (member p (live-paths %store)) + (begin + (remove-permanent-root p) + (->bool (member p (dead-paths %store))))))) + (test-assert "dead path can be explicitly collected" (let ((p (add-text-to-store %store "random-text" (random-text) '()))) |