mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
options: don't accept "error=" for -f and -r
* src/getargs.c (warning_argmatch, warnings_argmatch, WARNINGS_ARGMATCH): New. Use them for -W/--warning. They are copied from... (flag_argmatch, flags_argmatch, FLAGS_ARGMATCH): these. Simplify by removing the support for "error". * tests/input.at (Invalid options): New. * TODO (Laxism in Bison invocation arguments): Remove.
This commit is contained in:
@@ -20,6 +20,25 @@ AT_BANNER([[Input Processing.]])
|
||||
# Mostly test that we are robust to mistakes.
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Invalid options. ##
|
||||
## ----------------- ##
|
||||
|
||||
AT_SETUP([Invalid options])
|
||||
|
||||
AT_DATA([input.y],
|
||||
[[%%
|
||||
exp: '0'
|
||||
]])
|
||||
|
||||
# We used to accept these, as -f, --report and others were sharing
|
||||
# their code with -W.
|
||||
AT_BISON_CHECK([-ferror=caret input.y], [1], [], [ignore])
|
||||
AT_BISON_CHECK([--report=error=itemsets input.y], [1], [], [ignore])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Invalid inputs. ##
|
||||
## ---------------- ##
|
||||
|
||||
Reference in New Issue
Block a user