summaryrefslogtreecommitdiff
path: root/tests/run_all.sh
blob: 5727afbbf8c03381d929e7e459ee8fb69189d47e (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 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