mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
@@ -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@
|
||||
;
|
||||
|
||||
@@ -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 {🌞}
|
||||
%%
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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], $@)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user