* Adapt tests2 Makefile to support testing tcc error reporting * Add test for previous commit
Unified · Split
| @@ -0,0 +1 @@ | |||
| 1 | struct A {} int i; | ||
| @@ -0,0 +1 @@ | |||
| 1 | 56_btype_excess-1.c:1: error: too many basic types | ||
| @@ -0,0 +1 @@ | |||
| 1 | char int i; | ||
| @@ -0,0 +1 @@ | |||
| 1 | 57_btype_excess-2.c:1: error: too many basic types | ||
| @@ -67,7 +67,9 @@ TESTS = \ · 66 unmodified lines | |||
| 67 | 51_static.test \ | 67 | 51_static.test \ |
| 68 | 52_unnamed_enum.test \ | 68 | 52_unnamed_enum.test \ |
| 69 | 54_goto.test \ | 69 | 54_goto.test \ |
| 70 | 55_lshift_type.test | 70 | 55_lshift_type.test \ |
| 71 | 56_btype_excess-1.test \ | ||
| 72 | 57_btype_excess-2.test | ||
| 71 | 73 | ||
| 72 | # 30_hanoi.test -- seg fault in the code, gcc as well | 74 | # 30_hanoi.test -- seg fault in the code, gcc as well |
| 73 | # 34_array_assignment.test -- array assignment is not in C standard | 75 | # 34_array_assignment.test -- array assignment is not in C standard |
| @@ -84,9 +86,9 @@ endif · 10 unmodified lines | |||
| 84 | %.test: %.c %.expect | 86 | %.test: %.c %.expect |
| 85 | @echo Test: $*... | 87 | @echo Test: $*... |
| 86 | @if [ "x`echo $* | grep args`" != "x" ]; \ | 88 | @if [ "x`echo $* | grep args`" != "x" ]; \ |
| 87 | then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output; \ | 89 | then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \ |
| 88 | else $(TCC) -run $< >$*.output; \ | 90 | else $(TCC) -run $< >$*.output 2>&1; \ |
| 89 | fi | 91 | fi || true |
| 90 | @if diff -bu $(<:.c=.expect) $*.output ; \ | 92 | @if diff -bu $(<:.c=.expect) $*.output ; \ |
| 91 | then rm -f $*.output; \ | 93 | then rm -f $*.output; \ |
| 92 | else exit 1; \ | 94 | else exit 1; \ |