From 61fbf5f04b37ad0f40de08874dc7e8bc1c8d3dfd Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 12 Oct 2014 09:26:21 +0900 Subject: [PATCH] tests: Avoid sed error on Mac OS X when dealing with binary input Reported by Ramsey Dow in: . * msgmerge-compendium-6: Run sed with LC_ALL=C, to avoid 'illegal byte sequence' error on Mac OS X. * format-sh-1: Likewise. --- gettext-tools/tests/ChangeLog | 9 +++++++++ gettext-tools/tests/format-sh-1 | 2 +- gettext-tools/tests/msgmerge-compendium-6 | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 07fc0f861..418612103 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,12 @@ +2014-10-12 Daiki Ueno + + tests: Avoid sed error on Mac OS X when dealing with binary input + Reported by Ramsey Dow in: + . + * msgmerge-compendium-6: Run sed with LC_ALL=C, to avoid 'illegal + byte sequence' error on Mac OS X. + * format-sh-1: Likewise. + 2014-10-10 Daiki Ueno tests: Add test for Debian bug#764580 diff --git a/gettext-tools/tests/format-sh-1 b/gettext-tools/tests/format-sh-1 index 8a8a68d84..e274a7b83 100755 --- a/gettext-tools/tests/format-sh-1 +++ b/gettext-tools/tests/format-sh-1 @@ -37,7 +37,7 @@ n=0 while read comment; do read string n=`expr $n + 1` - sed -e 's,\$,\\$,g' < f-sh-1-$n.in + LC_ALL=C sed -e 's,\$,\\$,g' < f-sh-1-$n.in gettext ${string}; EOF ${XGETTEXT} -L Shell --from-code=ISO-8859-1 -o f-sh-1-$n.po f-sh-1-$n.in || exit 1 diff --git a/gettext-tools/tests/msgmerge-compendium-6 b/gettext-tools/tests/msgmerge-compendium-6 index 8735acaa7..dd0411949 100755 --- a/gettext-tools/tests/msgmerge-compendium-6 +++ b/gettext-tools/tests/msgmerge-compendium-6 @@ -66,7 +66,7 @@ LC_ALL=C tr -d '\r' < mm-c-6-UUU.tmp > mm-c-6-UUU.out || exit 1 : ${MSGCONV=msgconv} ${MSGCONV} --to-code=UTF-8 mm-c-6-UUU.out | LC_ALL=C tr -d '\r' > mm-c-6-U.ok -${MSGCONV} --to-code=EUC-KR mm-c-6-UUU.out | sed -e 's,EUC-KR,euc-kr,' | LC_ALL=C tr -d '\r' > mm-c-6-E.ok +${MSGCONV} --to-code=EUC-KR mm-c-6-UUU.out | LC_ALL=C sed -e 's,EUC-KR,euc-kr,' | LC_ALL=C tr -d '\r' > mm-c-6-E.ok : ${DIFF=diff} ${DIFF} mm-c-6-E.ok mm-c-6-AEE.out || { exit 1; } -- 2.47.3