diff options
Diffstat (limited to 'tests/run_all.sh')
-rwxr-xr-x | tests/run_all.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/run_all.sh b/tests/run_all.sh new file mode 100755 index 0000000..5727afb --- /dev/null +++ b/tests/run_all.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +r=0 +for t in test_*; do + cd $t + php ../test.php > have + echo -ne "\e[1m$t\e[0m: " + if sed 's/\s*//' < have | grep -v '^$' | cmp -s want; then + echo "OK" + rm *.transc.php + else + echo "FAILED" + for tpl in *.tpl; do + php ../dump_ast.php < $tpl > $tpl.ast + done + r=1 + fi + cd .. +done + +exit $r |