summaryrefslogtreecommitdiff
path: root/tests/m4.at
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-05-21 17:23:21 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-05-21 20:14:59 +0200
commitf80890c4bb8e02a47e115dc68797cd33fcc97bef (patch)
treeac714e50812281b13badd1d4ac659c8cecbadfc9 /tests/m4.at
parent1ebc2ac55c8dfe22711a349ba1e591b5ac4e93c5 (diff)
downloadbison-f80890c4bb8e02a47e115dc68797cd33fcc97bef.tar.gz
fix generated comments
In Bison 3.6.2, the comments with brackets lose their brackets, for improper m4 quotation. * data/skeletons/bison.m4 (b4_gsub): New. * data/skeletons/c-like.m4 (_b4_comment): Use it. * tests/m4.at: Check b4_gsub.
Diffstat (limited to 'tests/m4.at')
-rw-r--r--tests/m4.at30
1 files changed, 28 insertions, 2 deletions
diff --git a/tests/m4.at b/tests/m4.at
index 440e975a..6a2ff83f 100644
--- a/tests/m4.at
+++ b/tests/m4.at
@@ -29,18 +29,44 @@ AT_DATA([input.m4],
[[m4@&t@_include(b4_skeletonsdir/[c.m4])
b4_output_begin([output.txt])
+
+b4_gsub([[abcd]],
+ [a], [b])
+b4_gsub([[abcd]],
+ [a], [b],
+ [b], [c],
+ [c], [d])
+
+_b4_comment([["/* () */"]])
+_b4_comment([["/* ( */"]])
+_b4_comment([["/* ) */"]])
+_b4_comment([["/* [] */"]])
+
b4_comment([["/* () */"]])
b4_comment([["/* ( */"]])
b4_comment([["/* ) */"]])
+b4_comment([["/* [] */"]])
+
b4_output_end([output.txt])
]])
AT_BISON_CHECK([-S ./input.m4 input.y])
AT_CHECK([cat output.txt], [],
-[/* "/\* () *\/" */
+[[
+[bbcd]
+[dddd]
+
+"/\* () *\/"
+"/\* ( *\/"
+"/\* ) *\/"
+"/\* [] *\/"
+
+/* "/\* () *\/" */
/* "/\* ( *\/" */
/* "/\* ) *\/" */
-])
+/* "/\* [] *\/" */
+
+]])
AT_CLEANUP