#! /bin/sh
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles mco-test2.po"
cat <<\EOF > mco-test2.po
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "exactly 2 input files required"
msgstr "此功能需要恰好指定兩個輸入檔"
EOF
tmpfiles="$tmpfiles mco-test2.out"
: ${MSGCONV=msgconv}
${MSGCONV} -t Big5 mco-test2.po -o mco-test2.out
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles mco-test2.ok"
cat <<\EOF > mco-test2.ok
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=BIG5\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "exactly 2 input files required"
msgstr "\ݭnnwӿJ"
EOF
: ${DIFF=diff}
${DIFF} mco-test2.ok mco-test2.out >/dev/null
result=$?
rm -fr $tmpfiles
exit $result