autoconf-patches
[Top][All Lists]
Advanced

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

Re: fix autotest option parsing


From: Ralf Wildenhues
Subject: Re: fix autotest option parsing
Date: Sun, 25 Feb 2007 10:58:50 +0100
User-agent: Mutt/1.5.13 (2007-02-12)

Hi Eric,

* Eric Blake wrote on Sun, Feb 25, 2007 at 04:48:19AM CET:
> 
> 1) POSIX suggests that implementations support compressed short options,
> even though it is not canonical style.  I was bothered when I tried to
> save typing with 'tests/testsuite -lkm4sugar', and had to use the longer
> 'tests/testsuite -l -k m4sugar' instead.

It's a bit sad that this requires "$@" to remain untouched by the user.
Maybe it's time to add some tests (and maybe even documentation) for the
currently undocumented macros AT_ARG_OPTION and AT_ARG_OPTION_ARG.
Connected with this, I have some doubts: I don't think your patch will
fix things for options defined with those macros.  Further, I don't even
see right away whether your patch doesn't require changes to
_AT_ARG_OPTION in order not to break that functionality.

That being said, I never liked the ability to clump short options
without arguments together with a short option with arguments, as in
   -lkkeyword

That is just too ugly for words IMVHO.  Clumping options without
arguments seems less of a problem to me.  But even there I would
not mind _not_ providing this functionality in testsuite, if it
prevents other useful functionality, or if we cannot provide it
consistently.

For example, we obviously cannot provide the functionality of accepting
--ver as shorthand for --version, since we cannot know whether the user
may add an option --vertical.  ;-)

> 2) GNU Coding standards require that 'tests/testsuite --version --help'
> output version info, not help.

I think the patch for this is obviously ok (although a test exercising
this for all programs that the Autoconf package has would be nice  ;-)
Maybe you can write a gnulib module GCS-check that tests such stuff.
Or, even better, add it to Automake's distcheck target right away (for
all built/installed *_PROGRAMS and *_SCRIPTS in `gnu' or maybe only in
`gnits' mode).  You can add those various requirements on `--version'
output, too, that I've neglected to write a patch for Automake for.  ;-)

> 3) Not patched here.  We should support -- to end options, to be
> consistent with POSIX, as in 'tests/testsuite -- foo=bar -2'.

I don't see any possible ambiguity ATM, so I don't think there is a need
for `--'.

> If this code is acceptable, I will need to add a test to the testsuite
> that exercises these features.

FWIW, I'd appreciate to see a patch including tests (or, even better,
documentation as well ;-).   Very IMVHO though.

Cheers,
Ralf

> 2007-02-24  Eric Blake  <address@hidden>
> 
>       * lib/autotest/general.m4 (AT_help_all): Recognize compressed
>       short options.  Obey GNU Coding Standards when presented both
>       --help and --version.




reply via email to

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