about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-06-10T10·08+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-06-10T10·08+0000
commit997b95a4af9b70bc36c57a681c1637499c5ed18c (patch)
treeba567cce10615d52642880e2ccf0f58fb3374261
parentb0e92f6d474ce91d7f071f9ed62bbb2015009c58 (diff)
* Fixed compatibility with old versions of "wc" that print whitespace
  before the count.

-rw-r--r--tests/referrers.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/referrers.sh b/tests/referrers.sh
index 2fdf0cf7c47e..e3f8e07bc1bb 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