about summary refs log tree commit diff
path: root/test/pnmquantall.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-09-30 18:51:40 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-09-30 18:51:40 +0000
commit8b2ff6a4ae59c1ab37af590a7340656f93dbddee (patch)
tree36477ce3fc89409c484ee53afa10dac9685e7700 /test/pnmquantall.test
parenteb9c9ea7fe9a04f1977bdd040c173c84f841d431 (diff)
downloadnetpbm-mirror-8b2ff6a4ae59c1ab37af590a7340656f93dbddee.tar.gz
netpbm-mirror-8b2ff6a4ae59c1ab37af590a7340656f93dbddee.tar.xz
netpbm-mirror-8b2ff6a4ae59c1ab37af590a7340656f93dbddee.zip
Copy Development as new Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3083 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pnmquantall.test')
-rwxr-xr-xtest/pnmquantall.test20
1 files changed, 15 insertions, 5 deletions
diff --git a/test/pnmquantall.test b/test/pnmquantall.test
index 7d9ddf82..cd01bb8d 100755
--- a/test/pnmquantall.test
+++ b/test/pnmquantall.test
@@ -2,16 +2,26 @@
 # This script tests: pnmquantall
 # Also requires: ppmtorgb3 pgmhist
 
-ppmtorgb3 testimg.ppm
+tmpdir=${tmpdir:-/tmp}
+test_ppm=${tmpdir}/testimg.ppm
 
-pnmquantall 20 testimg.red testimg.grn testimg.blu
+cp testimg.ppm ${tmpdir} &&
+ppmtorgb3 ${test_ppm}
 
-for i in testimg.red testimg.grn testimg.blu
+test_red=${tmpdir}/testimg.red
+test_grn=${tmpdir}/testimg.grn
+test_blu=${tmpdir}/testimg.blu
+
+pnmquantall 20 ${test_red} ${test_grn} ${test_blu}
+
+for i in ${test_red} ${test_grn} ${test_blu}
 do
-cksum $i
+cat $i | cksum
 done
 
 # Should print 1
 
-pnmcat testimg.red testimg.grn testimg.blu -tb | \
+pnmcat ${test_red} ${test_grn} ${test_blu} -tb | \
     pgmhist -m | awk '$2>0 {s++}; END { print (s<=20) }'
+
+rm ${test_red} ${test_grn} ${test_blu} ${test_ppm}
\ No newline at end of file