mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
main: fix error message for missing argument
* src/getargs.c (getargs): Don't display any argv other that argv[0] when reporting a missing argument. * tests/bison.in: Neutralize path differences in stderr. * tests/input.at (Invalid number of arguments): New.
This commit is contained in:
@@ -20,6 +20,31 @@ AT_BANNER([[Input Processing.]])
|
||||
# Mostly test that we are robust to mistakes.
|
||||
|
||||
|
||||
## ----------------------------- ##
|
||||
## Invalid number of arguments. ##
|
||||
## ----------------------------- ##
|
||||
|
||||
AT_SETUP([Invalid number of arguments])
|
||||
|
||||
AT_BISON_CHECK([], [1], [],
|
||||
[[bison: missing operand
|
||||
Try 'bison --help' for more information.
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([1.y 2.y], [1], [],
|
||||
[[bison: extra operand '2.y'
|
||||
Try 'bison --help' for more information.
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([--skeleton], [1], [],
|
||||
[[bison: option '--skeleton' requires an argument
|
||||
Try 'bison --help' for more information.
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
## Invalid options. ##
|
||||
## ----------------- ##
|
||||
|
||||
Reference in New Issue
Block a user