From: Daiki Ueno Date: Tue, 30 Sep 2014 09:18:31 +0000 (+0900) Subject: tests: Don't use non-portable "grep -q" X-Git-Tag: v0.19.2.1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9c082bf8155383e2df3e2c03372b62d9760761f;p=thirdparty%2Fgettext.git tests: Don't use non-portable "grep -q" --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index c21c5901a..1789a1f5f 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,9 @@ +2014-09-30 Daiki Ueno + + * autopoint-1: Don't rely on non-portable "grep -q". + * msginit-3: Likewise. + * msgen-1: Likewise. + 2014-09-30 Daiki Ueno * xgettext-c-19: Test octal string escape. diff --git a/gettext-tools/tests/autopoint-1 b/gettext-tools/tests/autopoint-1 index 84d27873e..1a6be8f7d 100755 --- a/gettext-tools/tests/autopoint-1 +++ b/gettext-tools/tests/autopoint-1 @@ -22,7 +22,7 @@ export gettext_datadir # Check if sanity checks are actually working. # no configure.ac -$gettext_datadir/autopoint 2>&1 | grep -q 'Missing configure.in or configure.ac' \ +$gettext_datadir/autopoint 2>&1 | grep 'Missing configure.in or configure.ac' 2>&1 >/dev/null \ || exit 1 test ! -d intl || exit 1 @@ -40,7 +40,7 @@ AC_CONFIG_FILES([Makefile]) AC_OUTPUT EOF -$gettext_datadir/autopoint 2>&1 | grep -q 'Missing version' \ +$gettext_datadir/autopoint 2>&1 | grep 'Missing version' 2>&1 >/dev/null \ || exit 1 test ! -d intl || exit 1 @@ -61,7 +61,7 @@ EOF test -d intl || mkdir intl echo bogus-version > intl/VERSION -$gettext_datadir/autopoint 2>&1 | grep -q 'Missing version' \ +$gettext_datadir/autopoint 2>&1 | grep 'Missing version' 2>&1 >/dev/null \ || exit 1 test ! -d m4 || exit 1 @@ -84,7 +84,7 @@ echo gettext-0.15 > intl/VERSION # For further investigation, autopoint keeps autopoint.diff in $TMPDIR # if there is a mismatch. Set TMPDIR not to pollute /tmp. -TMPDIR="$PWD" $gettext_datadir/autopoint 2>&1 | grep -q 'locally modified' || exit 1 +TMPDIR="$PWD" $gettext_datadir/autopoint 2>&1 | grep 'locally modified' 2>&1 >/dev/null || exit 1 test ! -d m4 || exit 1 test ! -d po || exit 1 diff --git a/gettext-tools/tests/msgen-1 b/gettext-tools/tests/msgen-1 index 889fe7bac..9b02ffaaa 100755 --- a/gettext-tools/tests/msgen-1 +++ b/gettext-tools/tests/msgen-1 @@ -60,7 +60,7 @@ test $result = 0 || exit $result # Test --lang option. ${MSGEN} --lang=fr -o men-test1.tmp men-test1.po || exit 1 -grep -q "Language: fr" men-test1.tmp || exit 1 +grep "Language: fr" men-test1.tmp 2>&1 >/dev/null || exit 1 grep -v "Language: fr" men-test1.tmp | LC_ALL=C tr -d '\r' > men-test1.out || exit 1 ${DIFF} men-test1.ok men-test1.out diff --git a/gettext-tools/tests/msginit-3 b/gettext-tools/tests/msginit-3 index a20f28702..923c4cf5d 100755 --- a/gettext-tools/tests/msginit-3 +++ b/gettext-tools/tests/msginit-3 @@ -40,7 +40,7 @@ EOF GETTEXTLIBDIR="$abs_top_srcdir"/src ${MSGINIT} -l ga_IE --no-translator -o mi-test3.tmp 2>mi-test3.err test $? = 0 || { cat mi-test3.err 1>&2; exit 1; } -grep -q "Project-Id-Version: gt-msginit " mi-test3.tmp || exit 1 +grep "Project-Id-Version: gt-msginit " mi-test3.tmp 2>&1 >/dev/null || exit 1 # The charset stored in the header entry is the locale encoding of the gl_IE # locale, which is system dependent, or ASCII if the locale does not exist.