From 997b95a4af9b70bc36c57a681c1637499c5ed18c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Jun 2008 10:08:15 +0000 Subject: [PATCH] * Fixed compatibility with old versions of "wc" that print whitespace before the count. --- tests/referrers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/referrers.sh b/tests/referrers.sh index 2fdf0cf7c..e3f8e07bc 100644 --- a/tests/referrers.sh +++ b/tests/referrers.sh @@ -42,7 +42,7 @@ if test "$newTime" != "$oldTime"; then exit 1 fi -if test "$(cat test-tmp/db/referrer/1 | wc -w)" != 1; then +if test "$(cat test-tmp/db/referrer/1 | wc -w)" -ne 1; then echo "reregistration duplicated referrers" exit 1 fi @@ -51,7 +51,7 @@ echo "collecting garbage..." ln -sfn $reference "$NIX_STATE_DIR"/gcroots/ref time $nixstore --gc -if test "$(cat test-tmp/db/referrer/abcdef | wc -w)" != 0; then +if test "$(cat test-tmp/db/referrer/abcdef | wc -w)" -ne 0; then echo "referrers not cleaned up" exit 1 fi