#! /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 |