summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2021-11-06 19:24:04 +0100
committerAkim Demaille <akim.demaille@gmail.com>2021-11-06 19:30:06 +0100
commitc95d0dd5f54b98825e4cfe00a807db78a073e376 (patch)
tree7db099d7f168367ece95bca3c42010df3f373331 /tests
parent76301e739956a929ac0710fbd3d51fd4fc5ee9cf (diff)
downloadbison-c95d0dd5f54b98825e4cfe00a807db78a073e376.tar.gz
warnings: be less picky about occurrences of m4_/b4_ in the output
Reported by Marko Mäkelä. <https://lists.gnu.org/r/bug-bison/2021-10/msg00026.html> * src/scan-skel.l: It is ok to have foob4_ or foom4_. * tests/skeletons.at (Suspicious sequences): New.
Diffstat (limited to 'tests')
-rw-r--r--tests/skeletons.at41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/skeletons.at b/tests/skeletons.at
index 0ed11027..30f25a61 100644
--- a/tests/skeletons.at
+++ b/tests/skeletons.at
@@ -324,3 +324,44 @@ AT_BISON_CHECK([[input.y]], [[1]], [[]],
]])
AT_CLEANUP
+
+
+## ---------------------- ##
+## Suspicious sequences. ##
+## ---------------------- ##
+
+AT_SETUP([[Suspicious sequences]])
+
+AT_DATA([[skel.c]],
+[[m4@&t@_include(b4_skeletonsdir/[c.m4])
+m4@&t@_divert_push(0)d@&t@nl
+@output(b4_parser_file_name@)d@&t@nl
+]b4_user_pre_prologue[
+]b4_user_post_prologue[
+b4_unevaluated
+m4@&t@_unevaluated
+]b4_epilogue[
+
+m4@&t@_divert_pop(0)
+]])
+
+AT_DATA([[input1.y]],
+[[%skeleton "./skel.c"
+%{
+ myb4_unevaluated
+ mym4_unevaluated
+%}
+%%
+start: ;
+%%
+myb4_unevaluated
+mym4_unevaluated
+]])
+
+AT_BISON_CHECK([[input1.y]], [], [],
+[[input1.tab.c:10: warning: suspicious sequence in the output: b4_unevaluated [-Wother]
+input1.tab.c:11: warning: suspicious sequence in the output: m4@&t@_unevaluated [-Wother]
+]])
+
+
+AT_CLEANUP