]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: more consistent checks about invalid options
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 11 Jan 2011 02:17:10 +0000 (03:17 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 11 Jan 2011 22:11:53 +0000 (23:11 +0100)
* 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').

ChangeLog
tests/aclocal.test
tests/automake.test
tests/no-outdir-option.test

index c2d5661e67657201707f68106e0b08d1abd376a7..7798c5ee8125c02eb9e8803a4bf6a774645a20d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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.
index 539fb01b776db8daab5760ae22e24539e3aa0aeb..64b72e156b8bf8083c6b41ce367d970860d03b4c 100755 (executable)
@@ -24,17 +24,17 @@ test -f fred
 
 $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
index 060720c464adbcdf7e77b18337a11633608d026e..98018a127dee0ede1c8a0025bb8fbe4d63a59d6f 100755 (executable)
@@ -17,8 +17,6 @@
 # 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.
@@ -37,3 +35,5 @@ grep 'unknown warning.*--help' stderr
 AUTOMAKE_fails --ver
 grep 'unrecognized option.*--ver' stderr
 $AUTOMAKE --vers
+
+:
index 748a2338b56653bf66d3291f27ca4e70234b656a..85921fc93fdc3cacf60226e9ed23a547cad95acb 100755 (executable)
 
 . ./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
 
 :