diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-07-06 22:04:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-07-06 22:04:28 +0000 |
commit | 2a82091a45d67cadfc93148176a446ffd67021f6 (patch) | |
tree | 97de970b798441206a6294867eac8a8b9ea49b3b /test/pnmremap2.test | |
parent | 9ebbf59ad1a4272a182172f190908ea3f4d7227b (diff) | |
download | netpbm-mirror-2a82091a45d67cadfc93148176a446ffd67021f6.tar.gz netpbm-mirror-2a82091a45d67cadfc93148176a446ffd67021f6.tar.xz netpbm-mirror-2a82091a45d67cadfc93148176a446ffd67021f6.zip |
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
Diffstat (limited to 'test/pnmremap2.test')
-rwxr-xr-x | test/pnmremap2.test | 17 |
1 files changed, 10 insertions, 7 deletions
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} |