diff options
author | Bruno Haible <bruno@clisp.org> | 2006-08-04 14:15:26 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:13:52 +0200 |
commit | 63d0e047c36622d943d615e5a2df612508477270 (patch) | |
tree | a8a1761dc579dd7b8f7ea5cd27b7b4a06c92982d /gettext-tools/tests | |
parent | e222b0378495ad491058be959bda8567dc70fb3e (diff) | |
download | external_gettext-63d0e047c36622d943d615e5a2df612508477270.zip external_gettext-63d0e047c36622d943d615e5a2df612508477270.tar.gz external_gettext-63d0e047c36622d943d615e5a2df612508477270.tar.bz2 |
Test for msgmerge --compendium behaviour when the input is in different
encodings.
Diffstat (limited to 'gettext-tools/tests')
-rwxr-xr-x | gettext-tools/tests/msgmerge-compendium-6 | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgmerge-compendium-6 b/gettext-tools/tests/msgmerge-compendium-6 new file mode 100755 index 0000000..f12375a --- /dev/null +++ b/gettext-tools/tests/msgmerge-compendium-6 @@ -0,0 +1,97 @@ +#! /bin/sh + +# Test compendium option with mixed encodings. +# 8 combinations total: +# POT file PO file Compendium +# mm-ko.ascii.pot mm-ko.euc-kr.po mm-ko-comp.euc-kr.po +# mm-ko.utf-8.pot mm-ko.utf-8.po mm-ko-comp.utf-8.po + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles mm-ko.utf-8.pot" +: ${MSGCONV=msgconv} +${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot ${top_srcdir}/tests/mm-ko.ascii.pot + +tmpfiles="$tmpfiles mm-ko.utf-8.po" +: ${MSGCONV=msgconv} +${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.po ${top_srcdir}/tests/mm-ko.euc-kr.po + +tmpfiles="$tmpfiles mm-ko-comp.utf-8.po" +: ${MSGCONV=msgconv} +${MSGCONV} --to-code=UTF-8 -o mm-ko-comp.utf-8.po ${top_srcdir}/tests/mm-ko-comp.euc-kr.po + +tmpfiles="$tmpfiles mm-c-6-AEE.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-AEE.out \ + --compendium ${top_srcdir}/tests/mm-ko-comp.euc-kr.po \ + ${top_srcdir}/tests/mm-ko.euc-kr.po ${top_srcdir}/tests/mm-ko.ascii.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-AEU.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-AEU.out \ + --compendium mm-ko-comp.utf-8.po \ + ${top_srcdir}/tests/mm-ko.euc-kr.po ${top_srcdir}/tests/mm-ko.ascii.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-AUE.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-AUE.out \ + --compendium ${top_srcdir}/tests/mm-ko-comp.euc-kr.po \ + mm-ko.utf-8.po ${top_srcdir}/tests/mm-ko.ascii.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-AUU.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-AUU.out \ + --compendium mm-ko-comp.utf-8.po \ + mm-ko.utf-8.po ${top_srcdir}/tests/mm-ko.ascii.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-UEE.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-UEE.out \ + --compendium ${top_srcdir}/tests/mm-ko-comp.euc-kr.po \ + ${top_srcdir}/tests/mm-ko.euc-kr.po mm-ko.utf-8.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-UEU.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-UEU.out \ + --compendium mm-ko-comp.utf-8.po \ + ${top_srcdir}/tests/mm-ko.euc-kr.po mm-ko.utf-8.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-UUE.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-UUE.out \ + --compendium ${top_srcdir}/tests/mm-ko-comp.euc-kr.po \ + mm-ko.utf-8.po mm-ko.utf-8.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-UUU.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-c-6-UUU.out \ + --compendium mm-ko-comp.utf-8.po \ + mm-ko.utf-8.po mm-ko.utf-8.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-c-6-U.ok mm-c-6-E.ok" +: ${MSGCONV=msgconv} +${MSGCONV} --to-code=UTF-8 -o mm-c-6-U.ok mm-c-6-UUU.out +${MSGCONV} --to-code=EUC-KR mm-c-6-UUU.out | sed -e 's,EUC-KR,euc-kr,' > mm-c-6-E.ok + +: ${DIFF=diff} +${DIFF} mm-c-6-E.ok mm-c-6-AEE.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-E.ok mm-c-6-AEU.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-U.ok mm-c-6-AUE.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-U.ok mm-c-6-AUU.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-U.ok mm-c-6-UEE.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-U.ok mm-c-6-UEU.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-U.ok mm-c-6-UUE.out || { rm -fr $tmpfiles; exit 1; } +${DIFF} mm-c-6-U.ok mm-c-6-UUU.out || { rm -fr $tmpfiles; exit 1; } + +rm -fr $tmpfiles + +exit 0 |