tests: factor iterating over skeletons

* tests/local.at (AT_FOR_EACH_SKEL): New.
Use where appropriate.
* data/skeletons/lalr1.d: Reject -d.
* tests/input.at, tests/scanner.at: Also check D.
This commit is contained in:
Akim Demaille
2021-08-07 12:14:35 +02:00
parent 80db1029e6
commit 6d86d26b33
4 changed files with 15 additions and 5 deletions

View File

@@ -2682,7 +2682,7 @@ start: %empty;
# Only "full" and "none" are accepted for parse.lac
# Unknown values (such as "unsupported") are rejected
m4_foreach([b4_skel], [[yacc.c], [lalr1.cc], [lalr1.java]],
m4_foreach([b4_skel], [[yacc.c], [lalr1.cc], [lalr1.d], [lalr1.java]],
[AT_BISON_CHECK([[-S]b4_skel[ -Dparse.lac=none input.y]])
AT_BISON_CHECK([[-S]b4_skel[ -Dparse.lac=full input.y]])
AT_BISON_CHECK([[-S]b4_skel[ -Dparse.lac=unsupported input.y]],
@@ -2926,9 +2926,8 @@ exp:
# Disable -Wother to avoid the warnings about the suspicious presence
# of `b4_canary` in the output.
m4_foreach([b4_skel],
[[yacc.c], [glr.c], [lalr1.cc], [glr.cc], [glr2.cc], [lalr1.d], [lalr1.java]],
[AT_BISON_CHECK([[-Wno-other -S ]b4_skel[ ]m4_bmatch(b4_skel, [.*\.java$], [], [-d])[ input.y]])
AT_FOR_EACH_SKEL(
[AT_BISON_CHECK([[-Wno-other -S ]b4_skel[ ]m4_bmatch(b4_skel, [.*\.\(d\|java\)$], [], [-d])[ input.y]])
])
])