about summary refs log tree commit diff
path: root/test/pnmquant.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-06-30 19:38:50 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-06-30 19:38:50 +0000
commitffa495eb1f02bfc0e5f83a17e917e8709ec41356 (patch)
tree509aee1a7696e401ad791c39f9a4fab440b180c9 /test/pnmquant.test
parentaa813fa24371ead6a50fed6080fe82f8ccc7f491 (diff)
downloadnetpbm-mirror-ffa495eb1f02bfc0e5f83a17e917e8709ec41356.tar.gz
netpbm-mirror-ffa495eb1f02bfc0e5f83a17e917e8709ec41356.tar.xz
netpbm-mirror-ffa495eb1f02bfc0e5f83a17e917e8709ec41356.zip
Release 10.95.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4119 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pnmquant.test')
-rwxr-xr-xtest/pnmquant.test59
1 files changed, 40 insertions, 19 deletions
diff --git a/test/pnmquant.test b/test/pnmquant.test
index 3a2ef906..07830a3a 100755
--- a/test/pnmquant.test
+++ b/test/pnmquant.test
@@ -7,30 +7,30 @@ echo "Test 1"
 # Count colors in output image.
 
 pnmquant 256 testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 256) , ($2 > 256 * 0.95)}' 
+  awk 'NR==1 {print ($2 <= 256) , ($2 > 256 * 0.95)}'
 
 pnmquant -center 256 testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 256) , ($2 > 256 * 0.95)}' 
+  awk 'NR==1 {print ($2 <= 256) , ($2 > 256 * 0.95)}'
 
 pnmquant -spreadbrightness 256 testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 256) , ($2 > 256 * 0.95)}' 
+  awk 'NR==1 {print ($2 <= 256) , ($2 > 256 * 0.95)}'
 
 pnmquant -spreadluminosity 128 testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 128) , ($2 > 128 * 0.95)}' 
+  awk 'NR==1 {print ($2 <= 128) , ($2 > 128 * 0.95)}'
 
 pnmquant -floyd -randomseed=0 128 testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 128) , ($2 > 128 * 0.95)}' 
+  awk 'NR==1 {print ($2 <= 128) , ($2 > 128 * 0.95)}'
 
 pnmquant 64 -meanpixel testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 64) , ($2 > 64 * 0.9)}' 
+  awk 'NR==1 {print ($2 <= 64) , ($2 > 64 * 0.9)}'
 
 pnmquant 16 -meancolor testimg.ppm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 16) , ($2 > 16 * 0.9)}' 
+  awk 'NR==1 {print ($2 <= 16) , ($2 > 16 * 0.9)}'
 
 
 pnmquant 2 testgrid.pbm | ppmhist | \
-  awk 'NR==1 {print ($2 <= 2) , ($2 == 2) }' 
- 
+  awk 'NR==1 {print ($2 <= 2) , ($2 == 2) }'
+
 echo "Test Invalid"
 
 echo 1>&2
@@ -42,20 +42,41 @@ tmpdir=${tmpdir:-/tmp}
 test_out=${tmpdir}/test_out
 
 pnmquant 0 testimg.ppm   > ${test_out} || \
-  echo -n "Expected failure 1"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 1"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
+
 pnmquant testimg.ppm  > ${test_out} || \
-  echo -n "Expected failure 2"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 2"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
+
 pnmquant 10.5 testimg.ppm > ${test_out} || \
-  echo -n "Expected failure 3"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 3"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
+
 pnmquant -center -meancolor 16 testimg.ppm > ${test_out} || \
-  echo -n "Expected failure 4"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 4"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
+
 pnmquant -center -meanpixel 16 testimg.ppm    > ${test_out} || \
-  echo -n "Expected failure 5"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 5"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
+
 pnmquant -meancolor -meanpixel 16 testimg.ppm > ${test_out} || \
-  echo -n "Expected failure 6"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 6"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
+
 pnmquant -spreadbrightness -spreadluminosity 16 testimg.ppm > ${test_out} || \
-  echo -n "Expected failure 7"; test -s ${test_out}; echo " "$?
-pnmquant -randomseed 1 -norandom 10 testimg.ppm > ${test_out} || \
-  echo -n "Expected failure 8"; test -s ${test_out}; echo " "$?
+  echo -n "Expected failure 7"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}
 
-rm ${test_out}
+pnmquant -randomseed 1 -norandom 10 testimg.ppm > ${test_out} || \
+  echo -n "Expected failure 8"
+  test -s ${test_out}; echo " "$?
+  rm -f {test_out}