From 2a82091a45d67cadfc93148176a446ffd67021f6 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 6 Jul 2014 22:04:28 +0000 Subject: Use red plane of testimg.ppm for test PGM input; rewrite file names which use tmpdir in the manner of symmetry.test; add some failure messages git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2225 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/pnmremap2.test | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'test/pnmremap2.test') diff --git a/test/pnmremap2.test b/test/pnmremap2.test index 3399dc39..e5444fda 100755 --- a/test/pnmremap2.test +++ b/test/pnmremap2.test @@ -8,20 +8,23 @@ alias pamtopnm="${PBM_BINPREFIX}pamtopnm" shopt -s expand_aliases -pamseq 3 5 -tupletype=RGB | pamtopnm \ - > ${tmpdir}/palette -pamdepth 255 ${tmpdir}/palette > ${tmpdir}/palette255 +tmpdir=${tmpdir:-/tmp} +palette=${tmpdir}/palette +palette255=${tmpdir}/palette255 + +pamseq 3 5 -tupletype=RGB | pamtopnm > ${palette} +pamdepth 255 ${palette} > ${palette255} # Test 2. Default (unmodified quantization) -pnmremap -mapfile=${tmpdir}/palette -nofloyd \ +pnmremap -mapfile=${palette} -nofloyd \ testimg.ppm | cksum # Test 3. Use first color in palette for missing colors -pnmremap -mapfile=${tmpdir}/palette255 -nofloyd \ +pnmremap -mapfile=${palette255} -nofloyd \ -firstisdefault testimg.ppm | cksum # Test 4. Use black for missing colors -pnmremap -mapfile=${tmpdir}/palette255 -nofloyd \ +pnmremap -mapfile=${palette255} -nofloyd \ -missingcolor=black testimg.ppm | cksum -rm ${tmpdir}/palette{,255} +rm ${palette} ${palette255} -- cgit 1.4.1