tests: Don't use non-portable "grep -q"

This commit is contained in:
Daiki Ueno 2014-09-30 18:18:31 +09:00
parent 5f977a30e5
commit c9c082bf81
4 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2014-09-30 Daiki Ueno <ueno@gnu.org>
* autopoint-1: Don't rely on non-portable "grep -q".
* msginit-3: Likewise.
* msgen-1: Likewise.
2014-09-30 Daiki Ueno <ueno@gnu.org>
* xgettext-c-19: Test octal string escape.

View File

@ -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

View File

@ -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

View File

@ -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.