bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/5] tests: don't duplicate the portability prologue


From: Akim Demaille
Subject: [PATCH 4/5] tests: don't duplicate the portability prologue
Date: Fri, 3 May 2019 21:19:18 +0200

* tests/actions.at, tests/input.at: Don't repeat the prologue, skip it.
* tests/diagnostics.at, tests/local.at: Comment changes.
---
 tests/actions.at     | 12 ++----------
 tests/diagnostics.at |  4 +++-
 tests/input.at       | 12 ++----------
 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], $@)])
 
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]