summaryrefslogtreecommitdiff
path: root/tests/run_all.sh
blob: 486454b45e2a281b5eeeeb61ac2b615eb2043169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

r=0
for t in test_*; do
	cd $t
	php ../test.php > have
	echo -ne "\e[1m$t\e[0m: "
	if cmp -s want have; 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