* 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 | 67 | 51_static.test \ |
| 68 | 68 | 52_unnamed_enum.test \ |
| 69 | 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 | 74 | # 30_hanoi.test -- seg fault in the code, gcc as well |
| 73 | 75 | # 34_array_assignment.test -- array assignment is not in C standard |
| @@ -84,9 +86,9 @@ endif · 10 unmodified lines | ||
| 84 | 86 | %.test: %.c %.expect |
| 85 | 87 | @echo Test: $*... |
| 86 | 88 | @if [ "x`echo $* | grep args`" != "x" ]; \ |
| 87 | − then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output; \ | |
| 88 | − else $(TCC) -run $< >$*.output; \ | |
| 89 | − fi | |
| 89 | + then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \ | |
| 90 | + else $(TCC) -run $< >$*.output 2>&1; \ | |
| 91 | + fi || true | |
| 90 | 92 | @if diff -bu $(<:.c=.expect) $*.output ; \ |
| 91 | 93 | then rm -f $*.output; \ |
| 92 | 94 | else exit 1; \ |