+2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: more consistent checks about invalid options
+ * 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').
+
2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: enable 'errexit' shell flag by default.
$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'option.*--output.*an argument' stderr
+grep 'option.*--output.*requires an argument' stderr
grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'unrecognized.*--unknown-option' stderr
+grep 'unrecognized option.*--unknown-option' stderr
grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'unrecognized.*--ver' stderr
+grep 'unrecognized option.*--ver' stderr
grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --versi
# Test Automake's command-line options.
. ./defs || Exit 1
-$AUTOMAKE --help
-$AUTOMAKE --version
AUTOMAKE_fails --voo
grep 'unrecognized option.*--voo' stderr
# older perl has a buggy Getopt::Long which makes this fail.
AUTOMAKE_fails --ver
grep 'unrecognized option.*--ver' stderr
$AUTOMAKE --vers
+
+:
. ./defs || Exit 1
+: > Makefile.am
+
AUTOMAKE_fails -Wno-error --output-dir=foo
-$EGREP '(invalid|unrecognized) option.*--output-dir' stderr
+grep 'unrecognized option.*--output-dir' stderr
AUTOMAKE_fails -Wno-error -o foo
-$EGREP '(invalid|unrecognized) option.*-o' stderr
+grep 'unrecognized option.*-o' stderr
: