blob: ce4bbf56a46029af9635e9a58097eb67d10e0436 (
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
26
27
28
29
30
31
|
#! /bin/sh
# This script tests: ppmtomitsu
# Also requires: pnmcolormap pnmremap
tmpdir=${tmpdir:-/tmp}
testimg100_ppm=${tmpdir}/testimg100.ppm
echo "Test 0. Should print 458455366 101484"
# equivalent to: Pnmquant 100 testimg.ppm
pnmcolormap 100 testimg.ppm | pnmremap -nofloyd -mapfile=- testimg.ppm |\
tee ${testimg100_ppm} | cksum
echo "Test 1. Should print 3110813682 101562"
ppmtomitsu testimg.ppm | cksum
echo "Test 2. Should print 4168174994 34399"
ppmtomitsu ${testimg100_ppm} | cksum
echo "Test 3. Should print 3201293405 310"
ppmtomitsu testgrid.pbm | cksum
echo "Test 4. Should print 3354679572 752"
ppmtomitsu -tiny testgrid.pbm | cksum
echo "Test 5. Should print 3999654426 101549"
ppmtomitsu -tiny testimg.ppm | cksum
echo "Test 6. Should print 4201246884 101549"
ppmtomitsu -tiny ${testimg100_ppm} | cksum
rm ${testimg100_ppm}
|