mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 15:39:11 +00:00
43 lines
1001 B
Bash
Executable File
43 lines
1001 B
Bash
Executable File
#! /bin/sh
|
||
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
|
||
|
||
# Test conversion from BIG5 to UTF-8.
|
||
|
||
cat <<\EOF > mco-test1.po
|
||
# Chinese translation for GNU gettext messages.
|
||
#
|
||
msgid ""
|
||
msgstr ""
|
||
"MIME-Version: 1.0\n"
|
||
"Content-Type: text/plain; charset=big5\n"
|
||
"Content-Transfer-Encoding: 8bit\n"
|
||
|
||
#: src/msgcmp.c:155 src/msgmerge.c:273
|
||
msgid "exactly 2 input files required"
|
||
msgstr "此功能需要恰好指定兩個輸入檔"
|
||
EOF
|
||
|
||
: ${MSGCONV=msgconv}
|
||
${MSGCONV} --to-code=UTF-8 -o mco-test1.out mco-test1.po || Exit 1
|
||
|
||
cat <<\EOF > mco-test1.ok
|
||
# Chinese translation for GNU gettext messages.
|
||
#
|
||
msgid ""
|
||
msgstr ""
|
||
"MIME-Version: 1.0\n"
|
||
"Content-Type: text/plain; charset=UTF-8\n"
|
||
"Content-Transfer-Encoding: 8bit\n"
|
||
|
||
#: src/msgcmp.c:155 src/msgmerge.c:273
|
||
msgid "exactly 2 input files required"
|
||
msgstr "甇文<E79487><E69687>賡<EFBFBD>閬<EFBFBD><E996AC>憟賣<E6869F>摰𡁜<E691B0><F0A1819C>贝撓<E8B49D>交<EFBFBD>"
|
||
EOF
|
||
|
||
: ${DIFF=diff}
|
||
# Redirect stdout, so as not to fill the user's screen with non-ASCII bytes.
|
||
${DIFF} mco-test1.ok mco-test1.out >/dev/null
|
||
result=$?
|
||
|
||
exit $result
|