From 4296fe52a37736b7533b3bf447b29ad7933a3ab4 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 24 Nov 2012 19:18:45 +0000 Subject: New test framework, lots of tests git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1775 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/pnmremap2.test | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/pnmremap2.test (limited to 'test/pnmremap2.test') diff --git a/test/pnmremap2.test b/test/pnmremap2.test new file mode 100755 index 00000000..f2fd92e0 --- /dev/null +++ b/test/pnmremap2.test @@ -0,0 +1,21 @@ +#! /bin/bash +# This script tests: pnmremap +# Also requires: pamdepth pamseq pamtopnm + +${PBM_BINPREFIX}pamseq 3 5 -tupletype=RGB | ${PBM_BINPREFIX}pamtopnm \ + > ${tmpdir}/palette +${PBM_BINPREFIX}pamdepth 255 ${tmpdir}/palette > ${tmpdir}/palette255 + +# Test 2. Default (unmodified quantization) +${PBM_TESTPREFIX}pnmremap -mapfile=${tmpdir}/palette -nofloyd \ +testimg.ppm | cksum + +# Test 3. Use first color in palette for missing colors +${PBM_TESTPREFIX}pnmremap -mapfile=${tmpdir}/palette255 -nofloyd \ + -firstisdefault testimg.ppm | cksum + +# Test 4. Use black for missing colors +${PBM_TESTPREFIX}pnmremap -mapfile=${tmpdir}/palette255 -nofloyd \ +-missingcolor=black testimg.ppm | cksum + +rm ${tmpdir}/palette{,255} -- cgit 1.4.1