From: Daiki Ueno Date: Fri, 6 Feb 2015 03:26:43 +0000 (+0900) Subject: tests: Fix "broken pipe" error in msgfilter-7 X-Git-Tag: v0.19.5~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05392cbe402b5eab867799c621807ec938ce9498;p=thirdparty%2Fgettext.git tests: Fix "broken pipe" error in msgfilter-7 * msgfilter-7: Eat up filter input to avoid EPIPE in the parent msgfilter process, which was exposed on AIX 5. Reported by Michael Felt. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index bc82ccaa6..380b937a9 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,10 @@ +2015-02-06 Daiki Ueno + + tests: Fix "broken pipe" error in msgfilter-7 + * msgfilter-7: Eat up filter input to avoid EPIPE in the parent + msgfilter process, which was exposed on AIX 5. + Reported by Michael Felt. + 2015-02-05 Alex Henrie (tiny change) * xgettext-13: New file. diff --git a/gettext-tools/tests/msgfilter-7 b/gettext-tools/tests/msgfilter-7 index 8f4dbae82..791441bf2 100755 --- a/gettext-tools/tests/msgfilter-7 +++ b/gettext-tools/tests/msgfilter-7 @@ -54,9 +54,19 @@ msgstr "" #~ msgstr "das einen verheirateten Mann liebt" EOF +cat <<\EOF > mf-test7.sh +#! /bin/sh + +# Eat up filter input to avoid EPIPE in the parent process. +cat > /dev/null + +echo testing +EOF +chmod +x mf-test7.sh + : ${MSGFILTER=msgfilter} LC_ALL=C ${MSGFILTER} -i mfi-test7.po -o mfi-test7.out \ - echo testing >mfi-test7.err 2>&1 + ./mf-test7.sh >mfi-test7.err 2>&1 result=$? cat mfi-test7.err | grep -v 'warning: Locale charset' | grep -v '^ ' test $result = 0 || { exit 1; }