70 |
echo "OK" |
echo "OK" |
71 |
} |
} |
72 |
|
|
|
compare_lines() |
|
|
{ |
|
|
# use codelet to compare lines |
|
|
if [ $verbose -gt 1 ]; then |
|
|
cat tmp3.txt 1>&2 |
|
|
fi |
|
|
return `./a.out < tmp3.txt` |
|
|
} |
|
|
|
|
73 |
testoutput_for_prop() |
testoutput_for_prop() |
74 |
{ |
{ |
75 |
# testoutput_for_prop dir s1 label subdir |
# testoutput_for_prop dir s1 label subdir |
115 |
cat tmp3.txt 1>&2 |
cat tmp3.txt 1>&2 |
116 |
fi |
fi |
117 |
echo "-1" >> tmp3.txt |
echo "-1" >> tmp3.txt |
118 |
digits_of_similarity=`./tmp_cmpnum < tmp3.txt` |
# On the SGI O3K (*not* the O2K), "cat -n" inserts a ":" after the line number |
119 |
|
cat tmp3.txt | sed -e 's|:||g' > tmp4.txt |
120 |
|
digits_of_similarity=`./tmp_cmpnum < tmp4.txt` |
121 |
if [ $digits_of_similarity -eq 99 ]; then |
if [ $digits_of_similarity -eq 99 ]; then |
122 |
if [ $verbose -gt 0 ]; then |
if [ $verbose -gt 0 ]; then |
123 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
128 |
echo There were $digits_of_similarity decimal places of similarity for \"$2\" 1>&2 |
echo There were $digits_of_similarity decimal places of similarity for \"$2\" 1>&2 |
129 |
fi |
fi |
130 |
fi |
fi |
131 |
rm tmp1.txt tmp2.txt tmp3.txt |
rm -f tmp1.txt tmp2.txt tmp3.txt tmp4.txt |
132 |
|
|
133 |
return $digits_of_similarity |
return $digits_of_similarity |
134 |
} |
} |