picoc/tests/Makefile
zik.saleeba b2c95a5604 Tests are now more flexible about whitespace
git-svn-id: http://picoc.googlecode.com/svn/trunk@138 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-01 21:26:54 +00:00

29 lines
537 B
Makefile

TESTS= 00_assignment.test \
01_comment.test \
02_printf.test \
03_struct.test \
04_for.test \
05_array.test \
06_case.test \
07_function.test \
08_while.test \
09_do_while.test \
10_pointer.test
%.test: %.expect %.c
@echo Test: $*...
-@../picoc $*.c 2>&1 >$*.output
@if [ "x`diff -qbu $*.expect $*.output`" != "x" ]; \
then \
echo "error in test $*"; \
diff -u $*.expect $*.output; \
rm -f $*.output; \
exit 1; \
fi; \
rm -f $*.output
all: test
test: $(TESTS)
@echo "test passed"