#! /bin/bash
# This script tests: pnmtoxwd xwdtopnm
# Also requires: pamchannel pamtopnm pamdepth

echo "Test 1.  Should produce 1571496937 33838, cksum of testimg.red"
pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \
  pnmtoxwd | xwdtopnm | pamdepth 255 | cksum

echo "Test 2.  Should produce 1926073387 101484"
pnmtoxwd --quiet testimg.ppm | \
  xwdtopnm --quiet | pamdepth 255 | cksum

echo "Test 3.  Should produce 281226646 481"
pnmtoxwd --quiet maze.pbm | \
  xwdtopnm | cksum
