Browse Source

[master] Fix test problem on systems such as OS X

On some systems, the output of "wc -l" is left-justified.  On
others (the ones on which the test fails), the output is indented.
Replacing "cut" with "awk" fixes this.
Stephen Morris 14 years ago
parent
commit
21b0e9d23d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/log/tests/console_test.sh.in

+ 1 - 1
src/lib/log/tests/console_test.sh.in

@@ -26,7 +26,7 @@ tempfile=@abs_builddir@/console_test_tempfile_$$
 
 # Look at tempfile and check that the count equals the expected count
 passfail() {
-    count=`wc -l $tempfile | cut -f1 -d' '`
+    count=`wc -l $tempfile | awk '{print $1}'`
     if [ $count -eq $1 ]; then
         echo " -- pass"
     else