about summary refs log tree commit diff
path: root/test/ppmtomitsu.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-09-16 22:57:46 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-09-16 22:57:46 +0000
commit31b2f7ca49f576a9b7a5fe6b0cfed343c82d9d09 (patch)
tree38170a0a9e6f2e19b369c5f98d1f8ed4077b95ae /test/ppmtomitsu.test
parent1c49469266e75bd8f11cec532758ce22bd81d66d (diff)
downloadnetpbm-mirror-31b2f7ca49f576a9b7a5fe6b0cfed343c82d9d09.tar.gz
netpbm-mirror-31b2f7ca49f576a9b7a5fe6b0cfed343c82d9d09.tar.xz
netpbm-mirror-31b2f7ca49f576a9b7a5fe6b0cfed343c82d9d09.zip
test updates; move some tests from other directories to test directory, improve ppmrough, xwd-roundtrip
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4663 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/ppmtomitsu.test')
-rwxr-xr-xtest/ppmtomitsu.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/ppmtomitsu.test b/test/ppmtomitsu.test
new file mode 100755
index 00000000..ce4bbf56
--- /dev/null
+++ b/test/ppmtomitsu.test
@@ -0,0 +1,31 @@
+#! /bin/sh
+# This script tests: ppmtomitsu
+# Also requires: pnmcolormap pnmremap
+
+tmpdir=${tmpdir:-/tmp}
+testimg100_ppm=${tmpdir}/testimg100.ppm
+
+echo "Test 0. Should print 458455366 101484"
+# equivalent to: Pnmquant 100 testimg.ppm
+pnmcolormap 100 testimg.ppm | pnmremap -nofloyd -mapfile=- testimg.ppm |\
+ tee ${testimg100_ppm} | cksum
+
+echo "Test 1. Should print 3110813682 101562"
+ppmtomitsu testimg.ppm | cksum 
+
+echo "Test 2. Should print 4168174994 34399"
+ppmtomitsu ${testimg100_ppm} | cksum 
+
+echo "Test 3. Should print 3201293405 310"
+ppmtomitsu testgrid.pbm | cksum 
+
+echo "Test 4. Should print 3354679572 752"
+ppmtomitsu -tiny testgrid.pbm | cksum 
+
+echo "Test 5. Should print 3999654426 101549"
+ppmtomitsu -tiny testimg.ppm | cksum 
+
+echo "Test 6. Should print 4201246884 101549"
+ppmtomitsu -tiny ${testimg100_ppm} | cksum 
+
+rm ${testimg100_ppm}