Tag
Hash :
5a86371e
Author :
Date :
2002-07-10T20:30:24
* automake.in (parse_arguments): Call Getopt twice: once to catch --help or --verbose, and once to process the other arguments. (usage, verbose): Always exit 0, ignoring $exit_code (which anyway should always be 0 because of the change to parse_arguments). * tests/Makefile.am (TESTS): Add getopt.test. * tests/getopt.test: New file.
#! /bin/sh
# Automake --help, and --version should have priority over any other option
# so that their `exit 0' is coherent.
. $srcdir/defs || exit 1
set -e
# This is expected to fail ...
$AUTOMAKE -Wnonexistant 2>stderr && exit 1
cat stderr
grep ':.*nonexistant' stderr
# ... but this should not.
$AUTOMAKE -Wnonexistant --help 2>stderr
cat stderr
grep ':.*nonexistant' stderr && exit 1
# Similarly, this should fail ...
$AUTOMAKE --nonexistant 2>stderr && exit 1
cat stderr
grep ':.*nonexistant' stderr
# ... but this should not.
$AUTOMAKE --nonexistant --help 2>stderr
cat stderr
grep ':.*nonexistant' stderr && exit 1
: