about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-07-04 23:17:37 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-07-04 23:17:37 +0000
commita01946a90659603aef8ce34f6eaefa1b82e1a6ff (patch)
tree7b6f6284aa058eb4b35342eec3b7d94bf619f40d /test
parent2e92ce29ef808db0134ff7f9127953b6f9f915a6 (diff)
downloadnetpbm-mirror-a01946a90659603aef8ce34f6eaefa1b82e1a6ff.tar.gz
netpbm-mirror-a01946a90659603aef8ce34f6eaefa1b82e1a6ff.tar.xz
netpbm-mirror-a01946a90659603aef8ce34f6eaefa1b82e1a6ff.zip
Fix reliance on GNU utilities white space
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3889 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r--test/pamdice.ok2
-rwxr-xr-xtest/pamdice.test2
-rw-r--r--test/pamexec.ok4
-rwxr-xr-xtest/pamexec.test4
-rwxr-xr-xtest/pamtopdbimg.test2
-rwxr-xr-xtest/pamvalidate.test11
-rwxr-xr-xtest/pbmtext-utf8.test4
7 files changed, 16 insertions, 13 deletions
diff --git a/test/pamdice.ok b/test/pamdice.ok
index 83db2775..99504ec0 100644
--- a/test/pamdice.ok
+++ b/test/pamdice.ok
@@ -1,5 +1,5 @@
 Test 1.
-     10 P1@1 1@0@
+10 P1@1 1@0@
 Test 2.
 P1@1 1@0@
 P1@1 1@1@
diff --git a/test/pamdice.test b/test/pamdice.test
index 71a9d645..3199fd4a 100755
--- a/test/pamdice.test
+++ b/test/pamdice.test
@@ -12,7 +12,7 @@ pbmmake -w 2 5 | pamdice -height=1 -width=1 -outstem=${fname_stem} -plain
 ls ${fname_stem}*.pbm | while read file
   do
   cat ${file} | tr '\n'  '@' ; echo 
-  done | sort | uniq -c
+  done | sort | uniq -c | sed 's/^ *//'
 
 rm ${fname_stem}*.pbm
 
diff --git a/test/pamexec.ok b/test/pamexec.ok
index 4bfa5202..23e4268e 100644
--- a/test/pamexec.ok
+++ b/test/pamexec.ok
@@ -1,6 +1,6 @@
 Test 1 : Should print 10 stdin: PBM RAW 21 24 1 1 BLACKANDWHITE twice
-     10 stdin: PBM RAW 21 24 1 1 BLACKANDWHITE
-     10 stdin: PBM RAW 21 24 1 1 BLACKANDWHITE
+10 stdin: PBM RAW 21 24 1 1 BLACKANDWHITE
+10 stdin: PBM RAW 21 24 1 1 BLACKANDWHITE
 Test 2: Should print 1791121103 989 twice
 1791121103 989
 1791121103 989
diff --git a/test/pamexec.test b/test/pamexec.test
index acf162c3..44c11339 100755
--- a/test/pamexec.test
+++ b/test/pamexec.test
@@ -11,8 +11,8 @@ cat ${test_pbm}[0123456789] > ${combined_pbm}
 
 echo "Test 1 : Should print 10 stdin: PBM RAW 21 24 1 1 BLACKANDWHITE twice"
 
-cat ${combined_pbm} | pamfile -all -mach | uniq -c 
-pamexec "pamfile -mach" ${combined_pbm}  | uniq -c
+cat ${combined_pbm} | pamfile -all -mach | uniq -c | sed 's/^ *//' 
+pamexec "pamfile -mach" ${combined_pbm}  | uniq -c | sed 's/^ *//' 
 
 echo "Test 2: Should print 1791121103 989 twice"
 
diff --git a/test/pamtopdbimg.test b/test/pamtopdbimg.test
index 8de78a70..9afee8f1 100755
--- a/test/pamtopdbimg.test
+++ b/test/pamtopdbimg.test
@@ -21,7 +21,7 @@ echo high compression
 pgmmake 0.5 -maxval=15 160 160 > ${mono_pgm}
 for flag in "-compressed" "-maybecompressed" "-uncompressed"
    do
-   pamtopdbimg $flag ${mono_pgm} | wc -c
+   pamtopdbimg $flag ${mono_pgm} | wc -c | tr -d ' '
    done  | uniq -c | awk '{print $1}'
 rm ${mono_pgm}
 
diff --git a/test/pamvalidate.test b/test/pamvalidate.test
index 46dd1bfa..4cabc7df 100755
--- a/test/pamvalidate.test
+++ b/test/pamvalidate.test
@@ -6,12 +6,15 @@ echo "valid"
 echo -e "P1\n5 5\n01010\n10101\n01010\n00000\n11111\n" | pamvalidate -plain
 
 echo "not valid: Should print 0 four times"
-echo -e "P1\n5 5\n01010\n10101\n01010\n00000\n1111\n"  | pamvalidate | wc -c
+echo -e "P1\n5 5\n01010\n10101\n01010\n00000\n1111\n"  | pamvalidate | \
+  wc -c | tr -d ' '
 
-echo -e "P1\n5 5\n01010\n10102\n01010\n00001\n11111\n" | pamvalidate | wc -c
+echo -e "P1\n5 5\n01010\n10102\n01010\n00001\n11111\n" | pamvalidate | \
+  wc -c | tr -d ' '
 
-echo -e "P1\n5\n01010\n10101\n01010\n00000\n11111\n" | pamvalidate | wc -c
+echo -e "P1\n5\n01010\n10101\n01010\n00000\n11111\n" | pamvalidate | \
+  wc -c | tr -d ' '
 
-echo -e "P1\n5 5" | pamvalidate | wc -c
+echo -e "P1\n5 5" | pamvalidate | wc -c | tr -d ' '
 
 
diff --git a/test/pbmtext-utf8.test b/test/pbmtext-utf8.test
index 1db7d849..8ebb6e31 100755
--- a/test/pbmtext-utf8.test
+++ b/test/pbmtext-utf8.test
@@ -125,7 +125,7 @@ long_txt=${tmpdir}/long.txt
 test_out=${tmpdir}/test_out
 
 head -c 4999 /dev/zero | sed 's@\x00@\xc2\xbe@g' > ${long_txt}
-cat ${long_txt} | wc -c
+cat ${long_txt} | wc -c | tr -d ' '
 
 cat ${long_txt} | \
   LC_ALL=${locale_for_test} pbmtext -nomargins -builtin fixed -wchar | cksum
@@ -136,7 +136,7 @@ echo "Error messages should appear below the line." 1>&2
 echo "-----------------------------------------------------------" 1>&2
 
 echo -n "z" >> ${long_txt}
-cat ${long_txt} | wc -c
+cat ${long_txt} | wc -c | tr -d ' '
 
 cat ${long_txt} | \
   LC_ALL=${locale_for_test} \