From 3a5f8cc69e6687d2f074522cf9d69be4eea6d8f8 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 12 Dec 2010 14:17:41 +0100 Subject: [PATCH] Improve tests on generated portions of configure help screen. * tests/help-depend.test: Grepping of configure help screen relaxed to cater for possible line wrapping, and tightened in other respects. * tests/help-depend2.test: Likewise. * tests/help-dmalloc.test: Likewise. * tests/help-lispdir.test: Likewise. * tests/help-maintainer.test: Likewise. * tests/help-multilib.test: Likewise. * tests/help-silent.test: Likewise. * tests/help-upc.test: Likewise. * tests/help-init.test: Grepping of configure help screen tightened. --- ChangeLog | 16 ++++++++++++++++ tests/help-depend.test | 6 +++--- tests/help-depend2.test | 6 +++--- tests/help-dmalloc.test | 2 +- tests/help-init.test | 6 +++--- tests/help-lispdir.test | 8 +++++--- tests/help-maintainer.test | 9 ++++++--- tests/help-multilib.test | 2 +- tests/help-silent.test | 6 ++++-- tests/help-upc.test | 4 ++-- 10 files changed, 44 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5afdc53..2482ef1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2010-12-14 Stefano Lattarini + + Improve tests on generated portions of configure help screen. + * tests/help-depend.test: Grepping of configure help screen + relaxed to cater for possible line wrapping, and tightened in + other respects. + * tests/help-depend2.test: Likewise. + * tests/help-dmalloc.test: Likewise. + * tests/help-lispdir.test: Likewise. + * tests/help-maintainer.test: Likewise. + * tests/help-multilib.test: Likewise. + * tests/help-silent.test: Likewise. + * tests/help-upc.test: Likewise. + * tests/help-init.test: Grepping of configure help screen + tightened. + 2010-12-10 Ralf Wildenhues Avoid running installed automake from 'libtool --help'. diff --git a/tests/help-depend.test b/tests/help-depend.test index ed9447e..e676e5e 100755 --- a/tests/help-depend.test +++ b/tests/help-depend.test @@ -33,9 +33,9 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -$FGREP ' --enable-dependency-tracking ' stdout -$FGREP ' --disable-dependency-tracking ' stdout -$FGREP ' one-time build' stdout +$EGREP '^ *--enable-dependency-tracking( |$)' stdout +$EGREP '^ *--disable-dependency-tracking( |$)' stdout +$FGREP ' speeds up one-time build' stdout $FGREP ' slow dependency extract' stdout : diff --git a/tests/help-depend2.test b/tests/help-depend2.test index b4133b4..6bad661 100755 --- a/tests/help-depend2.test +++ b/tests/help-depend2.test @@ -34,9 +34,9 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -$FGREP ' --enable-dependency-tracking ' stdout -$FGREP ' --disable-dependency-tracking ' stdout -$FGREP ' one-time build' stdout +$EGREP '^ *--enable-dependency-tracking( |$)' stdout +$EGREP '^ *--disable-dependency-tracking( |$)' stdout +$FGREP ' speeds up one-time build' stdout $FGREP ' slow dependency extract' stdout : diff --git a/tests/help-dmalloc.test b/tests/help-dmalloc.test index c20288d..51b3ba4 100755 --- a/tests/help-dmalloc.test +++ b/tests/help-dmalloc.test @@ -32,7 +32,7 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -$FGREP ' --with-dmalloc ' stdout +$EGREP '^ *--with-dmalloc( |$) ' stdout $FGREP ' use dmalloc' stdout $FGREP 'www.dmalloc.com' stdout diff --git a/tests/help-init.test b/tests/help-init.test index a3af271..fdd9fa0 100755 --- a/tests/help-init.test +++ b/tests/help-init.test @@ -32,8 +32,8 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -grep ' --program-prefix[= ]' stdout -grep ' --program-suffix[= ]' stdout -grep ' --program-transform-name[= ]' stdout +grep '^ *--program-prefix[= ]' stdout +grep '^ *--program-suffix[= ]' stdout +grep '^ *--program-transform-name[= ]' stdout : diff --git a/tests/help-lispdir.test b/tests/help-lispdir.test index 3d82074..5eb7ab9 100755 --- a/tests/help-lispdir.test +++ b/tests/help-lispdir.test @@ -32,9 +32,11 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -grep ' --with-lispdir .*override.*lisp directory' stdout -grep ' EMACS .*[eE]macs editor' stdout -grep ' EMACSLOADPATH' stdout +$EGREP '^ *--with-lispdir( |$)' stdout +grep ' override.*lisp directory' stdout +$EGREP '^ *EMACS( |$)' stdout +grep ' .*[eE]macs editor' stdout +$EGREP '^ *EMACSLOADPATH( |$)' stdout grep ' .*[eE]macs library search path' stdout : diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test index 72fc98a..6933d0c 100755 --- a/tests/help-maintainer.test +++ b/tests/help-maintainer.test @@ -31,7 +31,8 @@ $ACLOCAL $AUTOCONF --force ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -grep ' --enable-maintainer-mode.*enable make rules' stdout +$EGREP '^ *--enable-maintainer-mode( |$)' stdout +$FGREP ' enable make rules' stdout rm -rf autom4te*.cache # just to be sure sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t @@ -42,7 +43,8 @@ $ACLOCAL $AUTOCONF --force ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -grep ' --enable-maintainer-mode.*enable make rules' stdout +$EGREP '^ *--enable-maintainer-mode( |$)' stdout +$FGREP ' enable make rules' stdout rm -rf autom4te*.cache # just to be sure sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t @@ -53,6 +55,7 @@ $ACLOCAL $AUTOCONF --force ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -grep ' --disable-maintainer-mode.*disable make rules' stdout +$EGREP '^ *--disable-maintainer-mode( |$)' stdout +$FGREP ' disable make rules' stdout : diff --git a/tests/help-multilib.test b/tests/help-multilib.test index 0016c76..1657c34 100755 --- a/tests/help-multilib.test +++ b/tests/help-multilib.test @@ -32,7 +32,7 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -$FGREP ' --enable-multilib ' stdout +$EGREP '^ *--enable-multilib( |$)' stdout $FGREP ' many library versions (default)' stdout : diff --git a/tests/help-silent.test b/tests/help-silent.test index b338907..e59f2f1 100755 --- a/tests/help-silent.test +++ b/tests/help-silent.test @@ -36,8 +36,10 @@ for args in '' '([])' '([yes])' '([no])'; do $AUTOCONF --force ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout - grep ' --enable-silent-rules *less verbose build.*undo.*make V=1' stdout - grep ' --disable-silent-rules *verbose build.*undo.*make V=0' stdout + $EGREP '^ *--enable-silent-rules( |$)' stdout + grep ' less verbose build.*undo.*make V=1' stdout + $EGREP '^ *--disable-silent-rules ( |$)' stdout + grep ' verbose build.*undo.*make V=0' stdout done : diff --git a/tests/help-upc.test b/tests/help-upc.test index 586299b..8f5ff5f 100755 --- a/tests/help-upc.test +++ b/tests/help-upc.test @@ -32,7 +32,7 @@ $AUTOCONF ./configure --help >stdout || { cat stdout; Exit 1; } cat stdout -grep ' UPCFLAGS .*Unified Parallel C compiler flags' stdout -grep ' UPC .*Unified Parallel C compiler command' stdout +grep '^ *UPCFLAGS .*Unified Parallel C compiler flags' stdout +grep '^ *UPC .*Unified Parallel C compiler command' stdout : -- 2.7.4