diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-05-03 08:58:59 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-05-03 16:28:28 +0200 |
commit | b5233ba323aa5eed354c3d581a9629647ac4aebb (patch) | |
tree | 4cf89608ff129893bc9e97208d678c9b250c6544 /tests | |
parent | 013720f0e7bd9558eacf7e3a9852ab922030c947 (diff) | |
download | bison-b5233ba323aa5eed354c3d581a9629647ac4aebb.tar.gz |
tests: don't duplicate the portability prologue
* tests/actions.at, tests/input.at: Don't repeat the prologue, skip it.
* tests/diagnostics.at, tests/local.at: Comment changes.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/actions.at | 12 | ||||
-rw-r--r-- | tests/diagnostics.at | 4 | ||||
-rw-r--r-- | tests/input.at | 12 | ||||
-rw-r--r-- | tests/local.at | 6 |
4 files changed, 10 insertions, 24 deletions
diff --git a/tests/actions.at b/tests/actions.at index 7157805b..691c84ec 100644 --- a/tests/actions.at +++ b/tests/actions.at @@ -196,16 +196,8 @@ one.y:11.3-8: previous declaration bison: file 'one.y' was updated (backup: 'one.y~') ]]) -AT_CHECK([cat one.y], [], -[[%code top { -/* Load config.h, and adjust to the compiler. - We used to do it here, but each time we add a new line, - we have to adjust all the line numbers in error messages. - It's simpler to use a constant include to a varying file. */ -#include <testsuite.h> -} - -%% +AT_CHECK([sed -e '1,8d' one.y], [], +[[%% exp: %empty {} @&t@ ; diff --git a/tests/diagnostics.at b/tests/diagnostics.at index cc09ef8e..80e85af2 100644 --- a/tests/diagnostics.at +++ b/tests/diagnostics.at @@ -20,6 +20,8 @@ AT_BANNER([[Diagnostics.]]) # AT_TEST($1: TITLE, $2: GRAMMAR, $3: EXIT-STATUS, $4: OUTPUT-WITH-STYLE) # ----------------------------------------------------------------------- +# Run Bison on GRAMMAR with debugging style enabled, and expect +# OUTPUT-WITH-STYLE as diagnostics. m4_pushdef([AT_TEST], [ AT_SETUP([$1]) @@ -221,7 +223,7 @@ input.y: <warning>warning:</warning> fix-its can be applied. Rerun with option # Locations coming from m4 need the byte-column for diagnostics. -AT_TEST([[Locations from M4]], +AT_TEST([[Tabulations and multibyte characters from M4]], [[%define api.prefix {sun} %define api.prefix {🌞} %% diff --git a/tests/input.at b/tests/input.at index 883056a4..c2a4478d 100644 --- a/tests/input.at +++ b/tests/input.at @@ -2590,16 +2590,8 @@ AT_CHECK([diff input.y.orig input.y~]) AT_CHECK([test ! -f output.c]) # Check the update. -AT_CHECK([cat input.y], [], -[[%code top { -/* Load config.h, and adjust to the compiler. - We used to do it here, but each time we add a new line, - we have to adjust all the line numbers in error messages. - It's simpler to use a constant include to a varying file. */ -#include <testsuite.h> -} - - +AT_CHECK([sed -e '1,8d' input.y], [], +[[ %default-prec %define parse.error verbose %expect-rr 0 diff --git a/tests/local.at b/tests/local.at index 9c0e85e3..8cce20b7 100644 --- a/tests/local.at +++ b/tests/local.at @@ -390,7 +390,7 @@ m4_define([AT_DATA_SOURCE_PROLOGUE], # AT_DATA_GRAMMAR_PROLOGUE # ------------------------ -# The prologue that should be included in any grammar which parser is +# The prologue that should be included in any grammar whose parser is # meant to be compiled. m4_define([AT_DATA_GRAMMAR_PROLOGUE], [[%code top { @@ -400,7 +400,7 @@ m4_define([AT_DATA_GRAMMAR_PROLOGUE], # AT_DATA_SOURCE(NAME, CONTENT) # ----------------------------- -# Generate the file NAME, which CONTENT is preceded by +# Generate the file NAME, whose CONTENT is preceded by # AT_DATA_SOURCE_PROLOGUE. m4_define([AT_DATA_SOURCE], [AT_DATA([$1], @@ -411,7 +411,7 @@ $2]) # AT_DATA_GRAMMAR(NAME, CONTENT) # ------------------------------ -# Generate the file NAME, which CONTENT is preceded by +# Generate the file NAME, whose CONTENT is preceded by # AT_DATA_GRAMMAR_PROLOGUE. m4_define([AT_DATA_GRAMMAR], [AT_LANG_DISPATCH([$0], $@)]) |