about summary refs log tree commit diff
path: root/tests/hash.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-12-14T14·08+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-12-14T14·08+0000
commit485d71c54a323e967ef4f0b4c5ebf97e97d7d725 (patch)
treeaeb525d0101fed9514ba0d38f177fd3074c4b825 /tests/hash.sh
parent30e4653783096c8349ef12512df12f0829764e65 (diff)
* Mac OS X 10.5 compatibility: `echo -n foo' suddenly prints `-n foo'
  instead of `foo' without a newline (with /bin/sh, not /bin/bash,
  even though /bin/sh is also bash...).  So use printf instead.

Diffstat (limited to 'tests/hash.sh')
-rw-r--r--tests/hash.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/hash.sh b/tests/hash.sh
index b3f3fa5bf9..5022ea2469 100644
--- a/tests/hash.sh
+++ b/tests/hash.sh
@@ -1,7 +1,7 @@
 source common.sh
 
 try () {
-    echo -n "$2" > $TEST_ROOT/vector
+    printf "%s" "$2" > $TEST_ROOT/vector
     hash=$($nixhash $EXTRA --flat --type "$1" $TEST_ROOT/vector)
     if test "$hash" != "$3"; then
         echo "hash $1, expected $3, got $hash"