Initial revision
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@2 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/asn1c/check-parsing.sh b/asn1c/check-parsing.sh
new file mode 100755
index 0000000..9a7bfde
--- /dev/null
+++ b/asn1c/check-parsing.sh
@@ -0,0 +1,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