From 80812209fb3d01aca5fc51c8cc441cdaae374162 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 7 Dec 2013 18:02:21 +0000 Subject: Remove ps-rountrip from revision 2046 - was an accident git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2051 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/ps-roundtrip.ok | 14 +--------- test/ps-roundtrip.test | 76 +++++++++++++++----------------------------------- 2 files changed, 23 insertions(+), 67 deletions(-) (limited to 'test') diff --git a/test/ps-roundtrip.ok b/test/ps-roundtrip.ok index 0ebfb94a..a267f7eb 100644 --- a/test/ps-roundtrip.ok +++ b/test/ps-roundtrip.ok @@ -1,15 +1,3 @@ 1926073387 101484 -1926073387 101484 -1926073387 101484 -1926073387 101484 -1926073387 101484 -2918318199 62 -2918318199 62 -2918318199 62 -2918318199 62 -2918318199 62 -2918318199 62 -2918318199 62 -1386192571 507420 -1386192571 507420 +2425386270 41 1386192571 507420 diff --git a/test/ps-roundtrip.test b/test/ps-roundtrip.test index b7aa816c..60ecf60a 100755 --- a/test/ps-roundtrip.test +++ b/test/ps-roundtrip.test @@ -1,70 +1,38 @@ #! /bin/bash # This script tests: pnmtops pstopnm -# Also requires: pnmtopnm pamtopnm gs pbmmake pnmshear pnmpad pnmcat +# Also requires: pnmtopnm pamtopnm gs -# Test 1. Should print: 1926073387 101484 five times -# *NOTE* Fifth iteration fails if pnmtops was compiled without zlib -# (flate compression) support. -for flag in "" "-ps" "-rle" "-ps -ascii" "-ps -flate" - do - ${PBM_TESTPREFIX}pnmtops -nocenter -equalpixels -dpi 72 -noturn \ - ${flag} testimg.ppm \ - > ${tmpdir}/testimg.ps - xysize1=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5}' \ - ${tmpdir}/testimg.ps` - ${PBM_TESTPREFIX}pstopnm -xborder=0 -yborder=0 $xysize1 -stdout \ - -quiet ${tmpdir}/testimg.ps | \ - ${PBM_BINPREFIX}pnmtopnm | cksum - done +# Test 1. Should print: 1926073387 101484 +${PBM_TESTPREFIX}pnmtops -nocenter -equalpixels -dpi 72 -noturn testimg.ppm \ + > ${tmpdir}/testimg.ps +xysize1=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5}' \ + ${tmpdir}/testimg.ps` +${PBM_TESTPREFIX}pstopnm -xborder=0 -yborder=0 $xysize1 -stdout \ + -quiet ${tmpdir}/testimg.ps | \ + ${PBM_BINPREFIX}pnmtopnm | cksum -# Test 2. Should print: 2918318199 62 seven times -# Test image designed to detect problems with run-length compression -# -${PBM_BINPREFIX}pbmmake -g 2 2 > ${tmpdir}/g.pbm -${PBM_BINPREFIX}pbmmake -g 8 4 | \ - ${PBM_BINPREFIX}pnmshear 45 -noantialias -background=black | \ - ${PBM_BINPREFIX}pnmpad -right 60 | \ - ${PBM_BINPREFIX}pnmcat -tb -jright - ${tmpdir}/g.pbm > ${tmpdir}/t.pbm && -for flag in "" "-rle" "-ps -rle -ascii" \ - "-bitspersample=2 -rle" "-ps -bitspersample=4 -rle" \ - "-bitspersample=8 -rle" "-ps -bitspersample=12 -rle -dict" - do - ${PBM_TESTPREFIX}pnmtops -nocenter -equalpixels -dpi 72 -noturn \ - ${flag} ${tmpdir}/t.pbm > ${tmpdir}/testgrid.ps && - xysize2=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5}' \ - ${tmpdir}/testgrid.ps` - ${PBM_TESTPREFIX}pstopnm -xborder=0 -yborder=0 $xysize2 -stdout \ - -quiet ${tmpdir}/testgrid.ps -pbm | \ - ${PBM_BINPREFIX}pnmtopnm | cksum - done +# Test 2. Should print: 2425386270 41 +${PBM_TESTPREFIX}pnmtops -nocenter -equalpixels -dpi 72 -noturn \ + testgrid.pbm > ${tmpdir}/testgrid.ps && +xysize2=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5}' \ + ${tmpdir}/testgrid.ps` +${PBM_TESTPREFIX}pstopnm -xborder=0 -yborder=0 $xysize2 -stdout \ + -quiet ${tmpdir}/testgrid.ps -pbm | \ + ${PBM_BINPREFIX}pnmtopnm | cksum -#Test 3. Should print: 1386192571 507420 three times -# *NOTE* Second iteration fails if pnmtops was compiled without zlib -# (flate compression) support. -# -# Special care is needed when conducting round-trips with multiple-image -# files as input. -# (1) pnmtops: -setpage is mandatory -# (2) awk: xy values are taken from the first "BoundingBox" encountered. -# Subsequent BoundingBox values are ignored. -# (3) pstopnm: input must be an ordinary file. Input from stdin -# (by pipe or input redirection: "< file" ) does not work. -# -for flag in "" "-ps" \ - "-ps -bitspersample=12 -flate -rle -vmreclaim" - do +#Test 3. Should print: 1386192571 507420 cat testimg.ppm testimg.ppm testimg.ppm testgrid.pbm testgrid.pbm | \ ${PBM_TESTPREFIX}pnmtops -nocenter -equalpixels -dpi 72 -noturn -setpage \ - ${flag} > ${tmpdir}/testimg5.ps + > ${tmpdir}/testimg5.ps xysize3=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5 ; exit}' \ ${tmpdir}/testimg5.ps` ${PBM_TESTPREFIX}pstopnm -xborder=0 -yborder=0 $xysize3 \ -stdout ${tmpdir}/testimg5.ps | \ ${PBM_BINPREFIX}pnmtopnm | cksum - done -rm ${tmpdir}/testgrid.ps ${tmpdir}/testimg.ps ${tmpdir}/testimg5.ps \ - ${tmpdir}/t.pbm +#rm ${tmpdir}/testgrid.ps ${tmpdir}/testimg.ps ${tmpdir}/testimg5.ps +rm ${tmpdir}/testimg.ps ${tmpdir}/testimg5.ps +mv ${tmpdir}/testgrid.ps /tmp -- cgit 1.4.1