about summary refs log tree commit diff
path: root/test/pamchannel.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-29 19:19:47 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-29 19:19:47 +0000
commit380588e187c12000ac8082cb2a20a905d3c422a5 (patch)
tree296b1324b7a9360646a34ae836b8eb486b7feede /test/pamchannel.test
parentf8b633c2be1231a0c194214271caa456dc669ecb (diff)
downloadnetpbm-mirror-380588e187c12000ac8082cb2a20a905d3c422a5.tar.gz
netpbm-mirror-380588e187c12000ac8082cb2a20a905d3c422a5.tar.xz
netpbm-mirror-380588e187c12000ac8082cb2a20a905d3c422a5.zip
Release 10.63.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1968 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pamchannel.test')
-rw-r--r--test/pamchannel.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/pamchannel.test b/test/pamchannel.test
new file mode 100644
index 00000000..f83dd3b6
--- /dev/null
+++ b/test/pamchannel.test
@@ -0,0 +1,32 @@
+#! /bin/bash
+# This script tests: pamchannel
+# Also requires: pamtopnm
+
+
+# Extract planes one by one.
+# Convert output to pgm to make it identical to ppmtorgb3 output.
+
+# $ ppmtorgb3 testimg.ppm ; cksum testimg.{red,grn,blu}
+#
+# 1571496937 33838 testimg.red
+# 394856971 33838 testimg.grn
+# 3164158573 33838 testimg.blu
+
+
+# Test 1. red channel
+# Should produce 1571496937 33838
+
+${PBM_TESTPREFIX}pamchannel -infile testimg.ppm 0 | \
+  ${PBM_BINPREFIX}pamtopnm --assume | cksum
+
+# Test 2. green channel
+# Should produce  394856971 33838
+
+${PBM_TESTPREFIX}pamchannel -infile testimg.ppm 1 | \
+  ${PBM_BINPREFIX}pamtopnm --assume | cksum
+
+# Test 3. blue channel
+# Should produce 3164158573 33838
+
+${PBM_TESTPREFIX}pamchannel -infile testimg.ppm 2 | \
+  ${PBM_BINPREFIX}pamtopnm --assume | cksum