blob: 1583cd68d83056744d51e4e10511f597e62d4168 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#! /bin/sh
# This script tests: pnmtoxwd xwdtopnm
# Also requires: pamchannel pamtopnm pamdepth ppmtopgm
echo "Test 1. Should produce 1571496937 33838, cksum of testimg.red twice"
pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \
pnmtoxwd | xwdtopnm | pamdepth 255 | cksum
pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \
pnmtoxwd -direct | xwdtopnm -quiet | pamdepth 255 | ppmtopgm | cksum
echo "Test 2. Should produce 1926073387 101484"
pnmtoxwd --quiet testimg.ppm | \
xwdtopnm --quiet | pamdepth 255 | cksum
echo "Test 3. Should produce 281226646 481 three times"
pnmtoxwd --quiet maze.pbm | xwdtopnm | cksum
pnmtoxwd --quiet -pseudodepth 1 maze.pbm | xwdtopnm | cksum
pnmtoxwd --quiet -pseudodepth 16 maze.pbm | xwdtopnm | cksum
|