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:
Akim Demaille
2013-02-13 17:29:42 +01:00
parent 219458e22f
commit c017f88fde
3 changed files with 122 additions and 44 deletions

View File

@@ -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. ##
## ---------------- ##