Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgconv-2
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test conversion from UTF-8 to BIG5.
5 # Test that encoding names are case insensitive.
6
7 cat <<\EOF > mco-test2.po
8 # Chinese translation for GNU gettext messages.
9 #
10 msgid ""
11 msgstr ""
12 "MIME-Version: 1.0\n"
13 "Content-Type: text/plain; charset=UTF-8\n"
14 "Content-Transfer-Encoding: 8bit\n"
15
16 #: src/msgcmp.c:155 src/msgmerge.c:273
17 msgid "exactly 2 input files required"
18 msgstr "此功能需要恰好指定兩個輸入檔"
19 EOF
20
21 : ${MSGCONV=msgconv}
22 ${MSGCONV} -t Big5 -o mco-test2.out mco-test2.po || exit 1
23
24 cat <<\EOF > mco-test2.ok
25 # Chinese translation for GNU gettext messages.
26 #
27 msgid ""
28 msgstr ""
29 "MIME-Version: 1.0\n"
30 "Content-Type: text/plain; charset=BIG5\n"
31 "Content-Transfer-Encoding: 8bit\n"
32
33 #: src/msgcmp.c:155 src/msgmerge.c:273
34 msgid "exactly 2 input files required"
35 msgstr "¦¹¥\¯à»Ý­n«ê¦n«ü©w¨â­Ó¿é¤JÀÉ"
36 EOF
37
38 : ${DIFF=diff}
39 # Redirect stdout, so as not to fill the user's screen with non-ASCII bytes.
40 ${DIFF} mco-test2.ok mco-test2.out >/dev/null
41 result=$?
42
43 exit $result