diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-04-17 15:20:06 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-04-17 15:20:06 +0000 |
commit | 2b398bac6127e1512be09eca1e1d67559c32c7c6 (patch) | |
tree | 49df2874254b0fe7fb1b76c34b0d724e6e7277e6 /test/ppmtoarbtxt-roundtrip.test | |
parent | daf35c1b334b76ba0d66d872cf9fb50864bacba9 (diff) | |
download | netpbm-mirror-2b398bac6127e1512be09eca1e1d67559c32c7c6.tar.gz netpbm-mirror-2b398bac6127e1512be09eca1e1d67559c32c7c6.tar.xz netpbm-mirror-2b398bac6127e1512be09eca1e1d67559c32c7c6.zip |
Add round-trip tests for 'xv', 'ppmtoarbtxt'; better cover compression scheme in macptoppm test
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2464 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/ppmtoarbtxt-roundtrip.test')
-rwxr-xr-x | test/ppmtoarbtxt-roundtrip.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/ppmtoarbtxt-roundtrip.test b/test/ppmtoarbtxt-roundtrip.test new file mode 100755 index 00000000..dff78250 --- /dev/null +++ b/test/ppmtoarbtxt-roundtrip.test @@ -0,0 +1,34 @@ +#! /bin/bash +# This script tests: ppmtoarbtxt +# Also requires: pnminvert pamtopnm + +# Test. Invert colors. +# Should print 1926073387 101484 + +tmpdir=${tmpdir:-/tmp} +headskl=${tmpdir}/headskl +bodyskl=${tmpdir}/bodyskl +inv_ppm=${tmpdir}/inv.ppm + +cat > ${headskl} << EOF +P3 +#(width) #(height) +255 + +EOF + +cat > ${bodyskl} << EOF +#(ired %d 255 0) #(igreen %d 255 0) #(iblue %d 255 0) + +EOF + +ppmtoarbtxt ${bodyskl} -hd ${headskl} testimg.ppm | tee ${inv_ppm} | + pnminvert | cksum + + +# Test 2. + +cat ${inv_ppm} | ppmtoarbtxt ${bodyskl} -hd ${headskl} | pamtopnm | cksum + + +rm ${bodyskl} ${headskl} |