about summary refs log tree commit diff
path: root/test/pamtopdbimg.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/pamtopdbimg.test')
-rwxr-xr-xtest/pamtopdbimg.test17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/pamtopdbimg.test b/test/pamtopdbimg.test
index 267f6bc8..8de78a70 100755
--- a/test/pamtopdbimg.test
+++ b/test/pamtopdbimg.test
@@ -48,14 +48,20 @@ rm ${noise_pgm}
 # 0
 # 1
 # 0
+
+# Some versions of wc have extra whitespace in the output (e.g. MAC OS)
+# Delete with tr -d
+
 echo long titles 
 for flag in "" "-title=0123456789012345678901234567890" \
                "-title=01234567890123456789012345678901"
    do
-   pamtopdbimg $flag testgrid.pbm | wc -c ; echo ${PIPESTATUS[0]}
+   pamtopdbimg $flag testgrid.pbm | wc -c | tr -d ' '
+   echo ${PIPESTATUS[0]}
    done
 
 
+
 # Test 4. large notefile
 # Should succeed twice and fail once, producing:
 # 3344
@@ -76,11 +82,14 @@ awk 'BEGIN { ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
 head -c 65533 ${text65597} > ${text65533}
 head -c 65534 ${text65597} > ${text65534}
-pamtopdbimg -uncompressed testgrid.pbm | wc -c
+pamtopdbimg -uncompressed testgrid.pbm | \
+  wc -c | tr -d ' '
   echo ${PIPESTATUS[0]}
-pamtopdbimg -uncompressed -notefile=${text65533} testgrid.pbm | wc -c
+pamtopdbimg -uncompressed -notefile=${text65533} testgrid.pbm | \
+  wc -c | tr -d ' '
   echo ${PIPESTATUS[0]}
-pamtopdbimg -uncompressed -notefile=${text65534} testgrid.pbm | wc -c
+pamtopdbimg -uncompressed -notefile=${text65534} testgrid.pbm | \
+  wc -c | tr -d ' '
   echo ${PIPESTATUS[0]}
 
 rm ${text65533} ${text65534} ${text65597}
\ No newline at end of file