diff --git a/tests/dependencies.sh b/tests/dependencies.sh
index a462dbf50..8d0fdc10f 100644
--- a/tests/dependencies.sh
+++ b/tests/dependencies.sh
@@ -6,7 +6,7 @@ drvPath=$(nix-instantiate dependencies.nix)
 
 echo "derivation is $drvPath"
 
-nix-store -q --tree "$drvPath" | grep '.   .───.*builder1.sh'
+nix-store -q --tree "$drvPath" | grep '───.*builder1.sh'
 
 # Test Graphviz graph generation.
 nix-store -q --graph "$drvPath" > $TEST_ROOT/graph