mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
tests: work around getopt portability issues
On some systems, we don't use our getopt. As a consequence the error
messages vary:
$ bison --skeleton
bison: option requires an argument -- skeleton
Try 'bison --help' for more information.
instead of
bison: option '--skeleton' requires an argument
Try 'bison --help' for more information.
Reported by Jannick and Nelson H. F. Beebe.
https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00140.html
* tests/input.at (Invalid number of arguments): work around getopt
portability issues.
This commit is contained in:
@@ -36,7 +36,13 @@ AT_BISON_CHECK([1.y 2.y], [1], [],
|
||||
Try 'bison --help' for more information.
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([--skeleton], [1], [],
|
||||
# For some reason, on some systems we use the system's getopt, not the
|
||||
# one we ship in gnulib. So we can get two different error messages.
|
||||
# See https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00154.html
|
||||
AT_BISON_CHECK([--skeleton], [1], [], [stderr])
|
||||
AT_CHECK([[sed -e \
|
||||
"s/requires an argument -- skeleton/'--skeleton' requires an argument/" \
|
||||
stderr]], 0,
|
||||
[[bison: option '--skeleton' requires an argument
|
||||
Try 'bison --help' for more information.
|
||||
]])
|
||||
|
||||
Reference in New Issue
Block a user