aboutsummaryrefslogtreecommitdiffstats
path: root/asn1c/check-parsing.sh
blob: 9a7bfde72ab3be2efe1e283cc341dfcf625f9667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

tmpfile=".check-parsing.$$.tmp"

ec=0

for ref in ../tests/*.asn1.-*; do
	src=`echo "$ref" | sed -e 's/\.-[a-zA-Z]*$//'`
	flags=`echo "$ref" | sed -e 's/.*\.-//'`
	echo "Checking $src against $ref"
	./asn1c "-$flags" "$src" > "$tmpfile" || ec=$?
	if [ $? = 0 ]; then
		diff "$ref" "$tmpfile" || ec=$?
	fi
	rm -f "$tmpfile"
done

exit $ec