mirror of https://gerrit.osmocom.org/asn1c
discover -a and -u flags
This commit is contained in:
parent
3ebc65a699
commit
cc3e13d4fa
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
tmpfile=".check-parsing.$$.tmp"
|
tmpfile=".check-parsing.$$.tmp"
|
||||||
|
|
||||||
diff -a . . 2>/dev/null && diffArgs="-a"
|
diff -a . . 2>/dev/null && diffArgs="-a" # Assume text files
|
||||||
|
diff -u . . 2>/dev/null && diffArgs="$diffArgs -u" # Unified diff output
|
||||||
|
|
||||||
ec=0
|
ec=0
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@ for ref in ../tests/*.asn1.-*; do
|
||||||
echo "Checking $src against $ref"
|
echo "Checking $src against $ref"
|
||||||
./asn1c "-$flags" "$src" > "$tmpfile" || ec=$?
|
./asn1c "-$flags" "$src" > "$tmpfile" || ec=$?
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
diff $diffArgs -u "$ref" "$tmpfile" || ec=$?
|
diff $diffArgs "$ref" "$tmpfile" || ec=$?
|
||||||
fi
|
fi
|
||||||
if [ "$1" != "regenerate" ]; then
|
if [ "$1" != "regenerate" ]; then
|
||||||
rm -f "$tmpfile"
|
rm -f "$tmpfile"
|
||||||
|
|
Loading…
Reference in New Issue