about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dependencies.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/dependencies.sh b/tests/dependencies.sh
index fe4aa0c3c960..56cb1e4c38d4 100644
--- a/tests/dependencies.sh
+++ b/tests/dependencies.sh
@@ -20,4 +20,7 @@ echo "$deps" | grep -q "$outPath"
 if echo "$deps" | grep -q "dependencies-input-1"; then exit 1; fi
 
 # Input-2 is retained.
-echo "$deps" | grep -q "dependencies-input-2"
+input2OutPath=$(echo "$deps" | grep "dependencies-input-2")
+
+# The referers closure of input-2 should include outPath.
+$TOP/src/nix-store/nix-store -q --referers-closure "$input2OutPath" | grep "$outPath"