aboutsummaryrefslogtreecommitdiffstats
path: root/tests/decode/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/decode/check.sh')
-rwxr-xr-xtests/decode/check.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/decode/check.sh b/tests/decode/check.sh
new file mode 100755
index 000000000..95445a011
--- /dev/null
+++ b/tests/decode/check.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# This work is licensed under the terms of the GNU LGPL, version 2 or later.
+# See the COPYING.LIB file in the top-level directory.
+
+PYTHON=$1
+DECODETREE=$2
+E=0
+
+# All of these tests should produce errors
+for i in err_*.decode; do
+ if $PYTHON $DECODETREE $i > /dev/null 2> /dev/null; then
+ # Pass, aka failed to fail.
+ echo FAIL: $i 1>&2
+ E=1
+ fi
+done
+
+for i in succ_*.decode; do
+ if ! $PYTHON $DECODETREE $i > /dev/null 2> /dev/null; then
+ echo FAIL:$i 1>&2
+ fi
+done
+
+exit $E