diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2018-01-18 11:19:13 +0100 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2018-02-18 12:37:09 +0100 |
commit | 903a80e0def90b88c1e4eead353af126a31a5422 (patch) | |
tree | a73a3acc46e368f6ace4c837593619387fb99ecc /t/automake-cmdline.tap | |
parent | 1d60fb72168e62d33fe433380af621de64e22f23 (diff) | |
download | automake-903a80e0def90b88c1e4eead353af126a31a5422.tar.gz |
tests: Don't check 'Getopt::Long' corner cases
Depending on the installed 'Getopt::Long' perl module, command-line
handling may vary a bit. As a consequence we prefer not to check
command-line corners cases. This change fixes automake bug#29638.
* t/aclocal.sh (am_create_testdir): Don't expect "--versi" to be
interpreted as "--version".
* t/automake-cmdline.tap: Don't expect "--vers" to be interpreted as
"--version" and things after "--" to be interpreted as file arguments.
(do_check): Display the actual command output.
* t/maken3.sh (check_targets): "--force" is not a documented option, so
don't use it.
Diffstat (limited to 't/automake-cmdline.tap')
-rw-r--r-- | t/automake-cmdline.tap | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/t/automake-cmdline.tap b/t/automake-cmdline.tap index c4441efe6..306231faa 100644 --- a/t/automake-cmdline.tap +++ b/t/automake-cmdline.tap @@ -18,7 +18,7 @@ . test-init.sh -plan_ 17 +plan_ 14 # Usage: bad_cmdline DESCRIPTION REGEX-FOR-STDERR [ARGS-FOR-AUTOMAKE...] do_check () @@ -28,18 +28,11 @@ do_check () regex=$1; shift AUTOMAKE_fails -d "$desc (run)" -- "$@" command_ok_ "$desc (stderr)" grep "$regex" stderr + cat stderr } do_check 'invalid long option' 'unrecognized option.*--voo' --voo -# Older perl has a buggy Getopt::Long which makes this fail. -if $PERL -e 'require 5.8.2;'; then - do_check "list of options terminated by '--'" \ - 'input file.*--voo' -- --voo -else - skip_row_ 2 -r "older perl with buggy Getopt::Long" -fi - do_check "empty argument" \ 'empty argument' '' @@ -58,6 +51,4 @@ do_check "'--help' as option argument" \ do_check "ambiguous incomplete option" \ 'unrecognized option.*--ver' --ver -command_ok_ "unambiguous incomplete long option" $AUTOMAKE --vers - : |