about summary refs log tree commit diff
path: root/tests/gc.sh
diff options
context:
space:
mode:
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.