automake-patches
[Top][All Lists]
Advanced

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

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


From: Stefano Lattarini
Subject: [PATCH] {master} tests: more consistent checks about invalid options
Date: Tue, 11 Jan 2011 13:48:41 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Another (minor) testsuite patch.

I will push to master in 72 hours if there are no objections.

Regards,
  Stefano

-*-*-

* 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                   |   12 ++++++++++++
 tests/aclocal.test          |    8 ++++----
 tests/automake.test         |    6 +++---
 tests/no-outdir-option.test |    8 +++++---
 4 files changed, 24 insertions(+), 10 deletions(-)

From c1f130116fe4933652c2cc82026a53395b7d009f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Tue, 11 Jan 2011 03:17:10 +0100
Subject: [PATCH] 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').
---
 ChangeLog                   |   12 ++++++++++++
 tests/aclocal.test          |    8 ++++----
 tests/automake.test         |    6 +++---
 tests/no-outdir-option.test |    8 +++++---
 4 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index da43d91..cdecccc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2011-01-11  Stefano Lattarini  <address@hidden>
 
+       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  <address@hidden>
+
        tests: work around a texi+cygnus bug causing a spurious XFAIL
        * tests/txinfo5b.test: New test, like txinfo5.test but calling
        automake with the `-Wno-override' option to work around a bug
diff --git a/tests/aclocal.test b/tests/aclocal.test
index 3e78df9..b97343e 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2004, 2008, 2010 Free Software
+# Copyright (C) 1998, 2001, 2002, 2004, 2008, 2010, 2011 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -26,17 +26,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
diff --git a/tests/automake.test b/tests/automake.test
index f8b4fef..5106607 100755
--- a/tests/automake.test
+++ b/tests/automake.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
 
 set -e
 
-$AUTOMAKE --help
-$AUTOMAKE --version
 AUTOMAKE_fails --voo
 grep 'unrecognized option.*--voo' stderr
 # older perl has a buggy Getopt::Long which makes this fail.
@@ -39,3 +37,5 @@ grep 'unknown warning.*--help' stderr
 AUTOMAKE_fails --ver
 grep 'unrecognized option.*--ver' stderr
 $AUTOMAKE --vers
+
+:
diff --git a/tests/no-outdir-option.test b/tests/no-outdir-option.test
index 827e318..7b45d6f 100755
--- a/tests/no-outdir-option.test
+++ b/tests/no-outdir-option.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -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
 
 AUTOMAKE_fails -Wno-error -o foo
-$EGREP '(invalid|unrecognized) option.*-o' stderr
+grep 'unrecognized option.*-o' stderr
 
 :
-- 
1.7.2.3


reply via email to

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