blob: b85c875c1f220b5f8adb50728c4284ae39500872 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#! /bin/sh
# This script tests: pbmtoatk atktopbm pbmtocis cistopbm pbmtocmuwm cmuwmtopbm
# This script tests: pbmtoescp2 escp2topbm pbmtog3 g3topbm pbmtogem gemtopnm
# This script tests: pbmtomacp macptopbm pbmtomda mdatopbm pbmtomgr mgrtopbm
# This script tests: pbmtomrf mrftopbm pbmtopi3 pi3topbm pbmtosunicon
# This script tests: sunicontopnm pbmtowbmp wbmptopbm pbmtoybm ybmtopbm
# Also requires:
tmpdir=${tmpdir:-/tmp}
out1=${tmpdir}/out1
out2=${tmpdir}/out2
out3=${tmpdir}/out3
out4=${tmpdir}/out4
for fmt in \
atk \
cis \
cmuwm \
escp2 \
g3 \
gem \
macp \
mda \
mgr \
mrf \
pi3 \
sunicon \
wbmp \
ybm
do
testprog1="pbmto"${fmt}
if [ ${fmt} = "sunicon" -o ${fmt} = "gem" ];
then testprog2=${fmt}"topnm";
else testprog2=${fmt}"topbm";
fi
${testprog1} testgrid.pbm > ${out1}; status1=$?
${testprog1} < testgrid.pbm > ${out2}; status2=$?
cmp -s ${out1} ${out2}
echo ${testprog1}": "${status1} ${status2} $?
${testprog2} ${out1} > ${out3}; status3=$?
${testprog2} < ${out1} > ${out4}; status4=$?
if [ ${fmt} = "xbm" ];
then sed -i '3s/noname/testgrid/' ${out3};
fi
cmp -s ${out3} ${out4}
echo ${testprog2}": "${status3} ${status4} $?
rm ${out1} ${out2} ${out3} ${out4}
done
# We don't test Pbmtopgm Pgmtopbm Asciitopbm Asciitopgm here
# Pbmtopk Pktopbm require resolution output pk file, tk file
# some conditions apply to input image dimensions
# These three programs embed the input file name in the output
# If the input is from stdin, "noname"
# Pbmtolps tested in lps-roundtrip.test
# Pbmtoxbm xbm-roundtrip.test
# Pbmtozinc pbm-misc-converters.test
# Icontopbm Pbmtoicon Pbmtox10bm are legacy
|