History

Add test for previous commit

* Adapt tests2 Makefile to support testing tcc error reporting * Add test for previous commit

Thomas Preud'homme committed 12 years ago

Commit f1f45a41 parent 6f6ed8a5 files · +10 −4Browse files

Unified · Split

5 files
  1. tests/tests2/56_btype_excess-1.c +1 −0
  2. tests/tests2/56_btype_excess-1.expect +1 −0
  3. tests/tests2/57_btype_excess-2.c +1 −0
  4. tests/tests2/57_btype_excess-2.expect +1 −0
  5. tests/tests2/Makefile +6 −4
tests/tests2/56_btype_excess-1.c+1−0
@@ -0,0 +1 @@
1+struct A {} int i;
tests/tests2/56_btype_excess-1.expect+1−0
@@ -0,0 +1 @@
1+56_btype_excess-1.c:1: error: too many basic types
tests/tests2/57_btype_excess-2.c+1−0
@@ -0,0 +1 @@
1+char int i;
tests/tests2/57_btype_excess-2.expect+1−0
@@ -0,0 +1 @@
1+57_btype_excess-2.c:1: error: too many basic types
tests/tests2/Makefile+6−4
@@ -67,7 +67,9 @@ TESTS = \ · 66 unmodified lines
6767 51_static.test \
6868 52_unnamed_enum.test \
6969 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
7173
7274 # 30_hanoi.test -- seg fault in the code, gcc as well
7375 # 34_array_assignment.test -- array assignment is not in C standard
@@ -84,9 +86,9 @@ endif · 10 unmodified lines
8486 %.test: %.c %.expect
8587 @echo Test: $*...
8688 @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
9092 @if diff -bu $(<:.c=.expect) $*.output ; \
9193 then rm -f $*.output; \
9294 else exit 1; \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t