blob: c5c2d6aa6c8f2759d88791b036c2ffcb4e2fd6c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
tmpfile=".check-parsing.$$.tmp"
ec=0
for ref in ../tests/*.asn1.-*; do
src=`echo "$ref" | sed -e 's/\.-[-a-zA-Z0-9=]*$//'`
flags=`echo "$ref" | sed -e 's/.*\.-//'`
echo "Checking $src against $ref"
./asn1c "-$flags" "$src" > "$tmpfile" || ec=$?
if [ $? = 0 ]; then
diff -a -u "$ref" "$tmpfile" || ec=$?
fi
if [ "$1" != "regenerate" ]; then
rm -f "$tmpfile"
else
mv "$tmpfile" "$ref"
fi
done
exit $ec
|