about summary refs log tree commit diff
path: root/tests/gc.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01T14·26+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01T14·26+0000
commitb90787290df216f511ec296c85390e645ca1e89f (patch)
treec269893e2d19f6bac41bce4fbd77b3c5f1b09812 /tests/gc.sh
parent089c41a0c2ecf91c55495547a5462d75f36be5f4 (diff)
* TDD! Woohoo!
Diffstat (limited to 'tests/gc.sh')
-rw-r--r--tests/gc.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/gc.sh b/tests/gc.sh
index c8e06109d1f6..e1b3a082046c 100644
--- a/tests/gc.sh
+++ b/tests/gc.sh
@@ -12,6 +12,15 @@ $nixstore --gc --print-live | grep $outPath
 $nixstore --gc --print-dead | grep $drvPath
 if $nixstore --gc --print-dead | grep $outPath; then false; fi
 
+$nixstore --gc --print-dead
+
+inUse=$(readLink $outPath/input-2)
+if $nixstore --delete $inUse; then false; fi
+test -e $inUse
+
+if $nixstore --delete $outPath; then false; fi
+test -e $outPath
+
 $NIX_BIN_DIR/nix-collect-garbage
 
 # Check that the root and its dependencies haven't been deleted.