From 333b03c6e0d8632b78db542c08119323a24af383 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 7 Sep 2020 16:02:14 +0000 Subject: new tests git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3949 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/winicon-roundtrip.test | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) (limited to 'test/winicon-roundtrip.test') 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 -- cgit 1.4.1