about summary refs log tree commit diff
path: root/test/rgb3-roundtrip.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-12-13 00:08:51 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-12-13 00:08:51 +0000
commita5d06d531c80a96a4041f8f19bdf89b847f71e80 (patch)
treeae8dafc409a0d8a88edae4fcec8b00298f3a8835 /test/rgb3-roundtrip.test
parentb62eff9e0c76dcdab094bf9fe32355c543ea909f (diff)
downloadnetpbm-mirror-a5d06d531c80a96a4041f8f19bdf89b847f71e80.tar.gz
netpbm-mirror-a5d06d531c80a96a4041f8f19bdf89b847f71e80.tar.xz
netpbm-mirror-a5d06d531c80a96a4041f8f19bdf89b847f71e80.zip
miscellaneous test updates
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4201 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/rgb3-roundtrip.test')
-rwxr-xr-xtest/rgb3-roundtrip.test34
1 files changed, 21 insertions, 13 deletions
diff --git a/test/rgb3-roundtrip.test b/test/rgb3-roundtrip.test
index 42fd822f..5edb1f19 100755
--- a/test/rgb3-roundtrip.test
+++ b/test/rgb3-roundtrip.test
@@ -10,6 +10,7 @@
 tmpdir=${tmpdir:-/tmp}
 
 # Test 1.  PPM (color) input
+echo "Test 1.  Should print 1926073387 101484"
 testimg_ppm=${tmpdir}/testimg.ppm
 testimg_red=${tmpdir}/testimg.red
 testimg_grn=${tmpdir}/testimg.grn
@@ -19,28 +20,35 @@ cp testimg.ppm ${tmpdir} &&
 ppmtorgb3 ${testimg_ppm} &&
 rgb3toppm ${testimg_red} ${testimg_grn} ${testimg_blu} | cksum
 
+# Simple cat of three planes
+echo "Test 2.  Should print 3744829044 101514"
 cat ${testimg_red} ${testimg_grn} ${testimg_blu} | cksum
 
 rm ${testimg_ppm} ${testimg_red} ${testimg_grn} ${testimg_blu}
 
-# Test 2.  PBM (monochrome) input
-testgrid_pbm=${tmpdir}/testgrid.pbm
-testgrid_red=${tmpdir}/testgrid.red
-testgrid_grn=${tmpdir}/testgrid.grn
-testgrid_blu=${tmpdir}/testgrid.blu
+# Test 3.  PBM (monochrome) input
+echo "Test 3.  Should print 281226646 481 twice"
+maze_pbm=${tmpdir}/maze.pbm
+maze_red=${tmpdir}/maze.red
+maze_grn=${tmpdir}/maze.grn
+maze_blu=${tmpdir}/maze.blu
 
-cp testgrid.pbm ${tmpdir} &&
-ppmtorgb3 ${testgrid_pbm} &&
-rgb3toppm ${testgrid_red} ${testgrid_grn} ${testgrid_blu} | \
+cp maze.pbm ${tmpdir} &&
+ppmtorgb3 ${maze_pbm} &&
+rgb3toppm ${maze_red} ${maze_grn} ${maze_blu} | \
   ppmtopgm | pgmtopbm -th -val=0.5 | cksum
+pgmtopbm -th -val=0.5 ${maze_red} | cksum
 
-# Test 3.
+# Test 4.
 # With PGM or PBM input, the three monochrome planes should be
 # identical.  Test for this.
 
-cmp -s ${testgrid_red} ${testgrid_grn} ; echo $?
-cmp -s ${testgrid_grn} ${testgrid_blu} ; echo $?
-pgmtopgm < testgrid.pbm | cmp -s - ${testgrid_red}
+echo "Test 4.  Should print 0 twice"
+cmp -s ${maze_red} ${maze_grn} ; echo $?
+cmp -s ${maze_grn} ${maze_blu} ; echo $?
+
+echo "Test 5.  Should print 0 0 : 0"
+pgmtopgm < maze.pbm | cmp -s - ${maze_red}
   echo ${PIPESTATUS[@]} ":" $?
 
-rm ${testgrid_pbm} ${testgrid_red} ${testgrid_grn} ${testgrid_blu}
+rm ${maze_pbm} ${maze_red} ${maze_grn} ${maze_blu}