automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] {master} tests: more consistent checks about invalid options


From: Ralf Wildenhues
Subject: Re: [PATCH] {master} tests: more consistent checks about invalid options
Date: Tue, 11 Jan 2011 20:37:26 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Stefano,

* Stefano Lattarini wrote on Tue, Jan 11, 2011 at 01:48:41PM CET:
> Another (minor) testsuite patch.

Discouraged, but OK with nit addressed.

Thanks,
Ralf

> * tests/aclocal.test: Grepping of automake stderr for messages
> reporting invalid options made stricter.
> * tests/no-outdir-option.test: Likewise.  Also, create a dummy
> `Makefile.am', to ensure that the automake failures are really
> caused only by unrecognized options.
> * tests/automake.test: Added trailing `:' command.  Removed
> redundant checks on `--help' and `--version' option (already
> performed in the test `help*.test').

> --- a/tests/no-outdir-option.test
> +++ b/tests/no-outdir-option.test

> @@ -20,10 +20,12 @@
>  
>  set -e
>  
> +: > Makefile.am
> +
>  AUTOMAKE_fails -Wno-error --output-dir=foo
> -$EGREP '(invalid|unrecognized) option.*--output-dir' stderr
> +grep 'unrecognized option.*--output-dir' stderr

This strikes me as wrong.  Why would you have written the test like this
in the first place if there wasn't a good reason for this?
(And just the time required to think about this, track down the reason
for the original choice, etc., wastes more than would have been gained
by this patch IMVHO.)

Maybe because Getopt::Long::GetOptions could throw a (differently
spelled) error itself?

>  AUTOMAKE_fails -Wno-error -o foo
> -$EGREP '(invalid|unrecognized) option.*-o' stderr
> +grep 'unrecognized option.*-o' stderr



reply via email to

[Prev in Thread] Current Thread [Next in Thread]