picoc/test/Makefile
zik.saleeba d6a7ac7c14 Redesigned the test system
git-svn-id: http://picoc.googlecode.com/svn/trunk@67 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 06:13:14 +00:00

23 lines
422 B
Makefile

TESTS= 00_assignment.test \
01_comment.test \
02_printf.test
%.test: %.expect %.c ../picoc
@echo Test: $*...
-@../picoc $*.c 2>&1 >$*.output
@if [ "x`diff -qu $*.expect $*.output`" != "x" ]; \
then \
echo "error in test $*"; \
diff -u $*.expect $*.output; \
exit 1; \
fi; \
rm -f $*.output
%.output: %.c ../picoc
@../picoc $< 2>&1 >$@
all: test
test: $(TESTS)
@echo "test passed"