mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-27 06:10:06 +08:00
Add test for previous commit
* Adapt tests2 Makefile to support testing tcc error reporting * Add test for previous commit
This commit is contained in:
parent
6f6ed8acc7
commit
f1f45a47ef
1
tests/tests2/56_btype_excess-1.c
Normal file
1
tests/tests2/56_btype_excess-1.c
Normal file
@ -0,0 +1 @@
|
||||
struct A {} int i;
|
1
tests/tests2/56_btype_excess-1.expect
Normal file
1
tests/tests2/56_btype_excess-1.expect
Normal file
@ -0,0 +1 @@
|
||||
56_btype_excess-1.c:1: error: too many basic types
|
1
tests/tests2/57_btype_excess-2.c
Normal file
1
tests/tests2/57_btype_excess-2.c
Normal file
@ -0,0 +1 @@
|
||||
char int i;
|
1
tests/tests2/57_btype_excess-2.expect
Normal file
1
tests/tests2/57_btype_excess-2.expect
Normal file
@ -0,0 +1 @@
|
||||
57_btype_excess-2.c:1: error: too many basic types
|
@ -67,7 +67,9 @@ TESTS = \
|
||||
51_static.test \
|
||||
52_unnamed_enum.test \
|
||||
54_goto.test \
|
||||
55_lshift_type.test
|
||||
55_lshift_type.test \
|
||||
56_btype_excess-1.test \
|
||||
57_btype_excess-2.test
|
||||
|
||||
# 30_hanoi.test -- seg fault in the code, gcc as well
|
||||
# 34_array_assignment.test -- array assignment is not in C standard
|
||||
@ -84,9 +86,9 @@ endif
|
||||
%.test: %.c %.expect
|
||||
@echo Test: $*...
|
||||
@if [ "x`echo $* | grep args`" != "x" ]; \
|
||||
then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output; \
|
||||
else $(TCC) -run $< >$*.output; \
|
||||
fi
|
||||
then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \
|
||||
else $(TCC) -run $< >$*.output 2>&1; \
|
||||
fi || true
|
||||
@if diff -bu $(<:.c=.expect) $*.output ; \
|
||||
then rm -f $*.output; \
|
||||
else exit 1; \
|
||||
|
Loading…
Reference in New Issue
Block a user