blob: f5980cdcb7c960b48e64729f15a7e1a1a1251ca0 (
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
|
#! /bin/sh
# This script tests: pgmabel pgmbentley pgmdeshadow pgmenhance pgmhist
# This script tests: pgmmedian pgmminkowski pgmtexture pgmtopbm pgmtoppm
# This script tests: rawtopgm
# Also requires: pgmmake
tmpdir=${tmpdir:-/tmp}
small_pgm=${tmpdir}/small.pgm
out1=${tmpdir}/out1
out2=${tmpdir}/out2
out3=${tmpdir}/out3
out4=${tmpdir}/out4
pgmmake 0.5 3 3 > ${small_pgm}
for testprog in \
pgmabel \
pgmbentley \
pgmdeshadow \
pgmenhance \
pgmhist \
pgmmedian \
pgmminkowski \
pgmtexture \
"pgmtopbm -th " \
"pgmtoppm rgb:00/00/00 " \
"rawtopgm -headerskip 11 3 3 "
do
${testprog} ${small_pgm} > ${out1}; status1=$?
${testprog} < ${small_pgm} > ${out2}; status2=$?
test -s ${out1}; status3=$?
cmp -s ${out1} ${out2}
echo ${testprog}": "${status1} ${status2} ${status3} $?
rm ${out1} ${out2}
done
rm ${small_pgm}
# Pgmtopgm accepts input only from stdin
# These three programs are legacy
# Pgmedge
# Pgmnorm
# Pgmoil
# Pgmmorphconv needs template file
|