blob: 223103c87d07d0137501a9dc1a797bc48b8260f4 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#! /bin/bash
# This script tests: pngtopnm pnmtopng
# Also requires:
alias pngtopnm="${PBM_TESTPREFIX}pngtopnm"
alias pnmtopng="${PBM_TESTPREFIX}pnmtopng"
shopt -s expand_aliases
## Fails because .ok not set yet.
# Test 1. Should print 1926073387 101484 18 times
for flags in "" -interlace \
-gamma=.45 \
-hist \
-nofilter \
-sub \
-up \
-avg \
-paeth \
-compression=9 \
"-compression=0 -comp_mem=1 -comp_window=8 -comp_buffer=512" \
"-compression=9 -comp_mem=1 -comp_window=15 -comp_buffer=512" \
"-compression=9 -comp_mem=1 -comp_window=8 -comp_buffer=512" \
"-compression=0 -comp_mem=9 -comp_window=8 -comp_buffer=512" \
"-compression=9 -comp_mem=9 -comp_window=15 -comp_buffer=8096" \
-comp_strategy=huffman_only \
-comp_strategy=filtered \
-force
do
pnmtopng testimg.ppm $flags | pngtopnm | cksum
done
# Test 2. Should print 2425386270 41 18 times
for flags in "" -interlace \
-gamma=.45 \
-hist \
-nofilter \
-sub \
-up \
-avg \
-paeth \
-compression=9 \
"-compression=0 -comp_mem=1 -comp_window=8 -comp_buffer=512" \
"-compression=9 -comp_mem=1 -comp_window=15 -comp_buffer=512" \
"-compression=9 -comp_mem=1 -comp_window=8 -comp_buffer=512" \
"-compression=0 -comp_mem=9 -comp_window=8 -comp_buffer=512" \
"-compression=9 -comp_mem=9 -comp_window=15 -comp_buffer=8096" \
-comp_strategy=huffman_only \
-comp_strategy=filtered \
-force
do
pnmtopng testgrid.pbm $flags | pngtopnm | cksum
done
|