summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-12-18 11:46:40 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-12-18 14:47:29 +0100
commitf3d6ca85d3fc962b77d2e0fbe06cab253394a110 (patch)
tree063a3e47fb13be31146c7e093225bd13e2854dcc
parenta1f9336b9dee4dcb97dd8488f22b1bc684f956f9 (diff)
downloadautomake-f3d6ca85d3fc962b77d2e0fbe06cab253394a110.tar.gz
automake-f3d6ca85d3fc962b77d2e0fbe06cab253394a110.tar.bz2
automake-f3d6ca85d3fc962b77d2e0fbe06cab253394a110.zip
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 <stefano.lattarini@gmail.com>
-rwxr-xr-xt/silent-texi.sh4
1 files changed, 2 insertions, 2 deletions
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.