From: Stefano Lattarini Date: Tue, 18 Dec 2012 10:46:40 +0000 (+0100) Subject: tests: avoid a "grep -E" portability issue X-Git-Tag: v1.12b~5 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3d6ca85d3fc962b77d2e0fbe06cab253394a110;p=thirdparty%2Fautomake.git tests: avoid a "grep -E" portability issue As stated in the Autoconf manual, the empty alternative is not portable with "grep -E". For example, while with GNU grep we have: $ echo b | grep -E '(|a)b'; echo status = $? b status = 0 with Solaris 10 /usr/xpg4/bin/grep we have: $ echo b | grep -E '(|a)b'; echo status = $? 1 status = 1 * t/silent-texi.sh: That was causing a spurious failure here. Fix it by simply using '?' instead (as suggested by the Autoconf manual). Signed-off-by: Stefano Lattarini --- diff --git a/t/silent-texi.sh b/t/silent-texi.sh index 358d06818..3ddbc4039 100755 --- a/t/silent-texi.sh +++ b/t/silent-texi.sh @@ -55,13 +55,13 @@ test $st -eq 0 grep '^ DVIPS foo\.ps$' stdout grep '^ MAKEINFO foo\.html$' stdout # NetBSD make will print './foo.info' instead of 'foo.info'. -$EGREP '^ MAKEINFO (|\./)foo\.info$' stdout +$EGREP '^ MAKEINFO (\./)?foo\.info$' stdout grep '^ TEXI2DVI foo\.dvi$' stdout grep '^ TEXI2PDF foo\.pdf$' stdout grep '^ DVIPS sub/zardoz.ps$' stdout grep '^ MAKEINFO sub/zardoz.html$' stdout # NetBSD make will print './sub/zardoz.info' instead of 'zardoz.info'. -$EGREP '^ MAKEINFO (|\./)sub/zardoz.info$' stdout +$EGREP '^ MAKEINFO (\./)?sub/zardoz.info$' stdout grep '^ TEXI2DVI sub/zardoz.dvi$' stdout grep '^ TEXI2PDF sub/zardoz.pdf$' stdout # No make recipe is displayed before being executed.