about summary refs log tree commit diff
path: root/test/winicon-roundtrip.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-09-07 16:02:14 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-09-07 16:02:14 +0000
commit333b03c6e0d8632b78db542c08119323a24af383 (patch)
treeb6d575a283dde402d099ed2b425b8df0fd1b6ee2 /test/winicon-roundtrip.test
parent51b81f893ead8949ebbcbc3e888269071909d7ce (diff)
downloadnetpbm-mirror-333b03c6e0d8632b78db542c08119323a24af383.tar.gz
netpbm-mirror-333b03c6e0d8632b78db542c08119323a24af383.tar.xz
netpbm-mirror-333b03c6e0d8632b78db542c08119323a24af383.zip
new tests
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3949 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/winicon-roundtrip.test')
-rwxr-xr-xtest/winicon-roundtrip.test42
1 files changed, 33 insertions, 9 deletions
diff --git a/test/winicon-roundtrip.test b/test/winicon-roundtrip.test
index b37a33e1..00c78400 100755
--- a/test/winicon-roundtrip.test
+++ b/test/winicon-roundtrip.test
@@ -1,13 +1,37 @@
 #! /bin/bash
-# This script tests: pamtowinicon winicontopam
-# Also requires: pamcut pnmtile pamtopnm ppmtopgm pgmtopbm
+# This script tests: pamtowinicon ppmtowinicon winicontopam
+# Also requires: pamchannel pamcut pamdepth pamtopam pngtopam pnmtile pnmtopng
 
+tmpdir=${tmpdir:-/tmp}
+test_pam=${tmpdir}/testimg.pam
 
-pamcut --left=30 --width=48 --height=48 testimg.ppm | \
-pamtowinicon | winicontopam | \
-  pamtopnm | cksum
+echo "Test 1. Should print 4241318573 6973 four times"
 
-pnmtile 32 32 testgrid.pbm | \
-pamtowinicon | winicontopam | \
-  pamtopnm | ppmtopgm | \
-  pgmtopbm  -th -val=0.5 | cksum
+pamcut --left=30 --width=48 --height=48 testimg.ppm | pamtopam | \
+  tee ${test_pam} | cksum
+pamtowinicon ${test_pam} | winicontopam | \
+  pamchannel -tupletype="RGB" 0 1 2 | cksum
+pamtowinicon -pngthreshold=300 ${test_pam} | winicontopam | \
+  pamchannel -tupletype="RGB" 0 1 2 | cksum
+pamtowinicon -pngthreshold=1   ${test_pam} | winicontopam | \
+  pamchannel -tupletype="RGB" 0 1 2 | cksum
+
+rm ${test_pam}
+
+echo "Test 1. Should print 819454437 1093 six times"
+
+pnmtile 32 32 testgrid.pbm | pamtopam | \
+  tee ${test_pam} | cksum
+pamtowinicon ${test_pam} | winicontopam | \
+  pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
+pamtowinicon -pngthreshold=300 ${test_pam} | winicontopam | \
+  pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
+pamtowinicon -pngthreshold=1   ${test_pam} | winicontopam | 
+  pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
+pamtowinicon -pngthreshold=1   ${test_pam} | winicontopam | 
+  pamchannel -tupletype="BLACKANDWHITE" 0 | cksum
+
+rm ${test_pam}
+
+pnmtile 32 32 testgrid.pbm | ppmtowinicon | winicontopam | \
+  pamdepth 1 | pamchannel -tupletype="BLACKANDWHITE" 0 | cksum