diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2014-03-25 20:54:19 +0800 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2014-03-25 20:54:19 +0800 |
| commit | f1f45a47ef1c58e52a9599026ef666affc991b44 (patch) | |
| tree | 7717cd7ac76274b0cd3f797d60efaf62182dae6f | |
| parent | 6f6ed8acc795b8f3367b46eed7b78f4f0a4584ff (diff) | |
| download | tinycc-f1f45a47ef1c58e52a9599026ef666affc991b44.tar.gz tinycc-f1f45a47ef1c58e52a9599026ef666affc991b44.tar.bz2 | |
Add test for previous commit
* Adapt tests2 Makefile to support testing tcc error reporting
* Add test for previous commit
| -rw-r--r-- | tests/tests2/56_btype_excess-1.c | 1 | ||||
| -rw-r--r-- | tests/tests2/56_btype_excess-1.expect | 1 | ||||
| -rw-r--r-- | tests/tests2/57_btype_excess-2.c | 1 | ||||
| -rw-r--r-- | tests/tests2/57_btype_excess-2.expect | 1 | ||||
| -rw-r--r-- | tests/tests2/Makefile | 10 |
5 files changed, 10 insertions, 4 deletions
diff --git a/tests/tests2/56_btype_excess-1.c b/tests/tests2/56_btype_excess-1.c new file mode 100644 index 0000000..06eabe7 --- /dev/null +++ b/tests/tests2/56_btype_excess-1.c @@ -0,0 +1 @@ +struct A {} int i; diff --git a/tests/tests2/56_btype_excess-1.expect b/tests/tests2/56_btype_excess-1.expect new file mode 100644 index 0000000..4e6d2d7 --- /dev/null +++ b/tests/tests2/56_btype_excess-1.expect @@ -0,0 +1 @@ +56_btype_excess-1.c:1: error: too many basic types diff --git a/tests/tests2/57_btype_excess-2.c b/tests/tests2/57_btype_excess-2.c new file mode 100644 index 0000000..ab95c3e --- /dev/null +++ b/tests/tests2/57_btype_excess-2.c @@ -0,0 +1 @@ +char int i; diff --git a/tests/tests2/57_btype_excess-2.expect b/tests/tests2/57_btype_excess-2.expect new file mode 100644 index 0000000..c12ef81 --- /dev/null +++ b/tests/tests2/57_btype_excess-2.expect @@ -0,0 +1 @@ +57_btype_excess-2.c:1: error: too many basic types diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index 51dc38d..c1bf5e6 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -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; \ |
