blob: eb25d2a00c52000470d344d4a251b57ba6cc8e11 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#! /bin/bash
# This script tests: pnminvert
# Also requires: pbmmake ppmtopgm
alias pnminvert="${PBM_TESTPREFIX}pnminvert"
alias pbmmake="${PBM_BINPREFIX}pbmmake"
alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm"
shopt -s expand_aliases
# Test 1. Should print 1240379484 41
pnminvert testgrid.pbm | cksum
# Test 2. Should print 1416115901 101484
pnminvert testimg.ppm | cksum
# Test 3. Should print 2961441369 33838
# printed 4215652354 33838 with older ppmtopgm
ppmtopgm testimg.ppm | pnminvert | cksum
# Test 4. Should print 2595564405 14
pbmmake -w 7 7 | pnminvert | cksum
# Test 5. Should print 2595564405 14
pbmmake -b 7 7 | cksum
# Test 6. Should print 2595564405 14
pbmmake -b 7 7 | pnminvert | \
pnminvert | cksum
# Test 7. Should print 2896726098 15
pbmmake -g 8 8 | pnminvert | cksum
|