picoc/test/Makefile
zik.saleeba 3a2c0552d6 Added struct test
git-svn-id: http://picoc.googlecode.com/svn/trunk@68 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 06:17:28 +00:00

25 lines
475 B
Makefile

TESTS= 00_assignment.test \
01_comment.test \
02_printf.test \
03_struct.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; \
rm -f $*.output; \
exit 1; \
fi; \
rm -f $*.output
%.output: %.c ../picoc
@../picoc $< 2>&1 >$@
all: test
test: $(TESTS)
@echo "test passed"