mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
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.
This commit is contained in:
30
tests/m4.at
30
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
|
||||
|
||||
Reference in New Issue
Block a user