Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgconv-7
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --add-location=file option.
5
6 cat <<\EOF > mco-test7.po
7 # Chinese translation for GNU gettext messages.
8 #
9 msgid ""
10 msgstr ""
11 "MIME-Version: 1.0\n"
12 "Content-Type: text/plain; charset=big5\n"
13 "Content-Transfer-Encoding: 8bit\n"
14
15 #: src/msgcmp.c:155 src/msgmerge.c:273
16 msgid "exactly 2 input files required"
17 msgstr "¦¹¥\¯à»Ý­n«ê¦n«ü©w¨â­Ó¿é¤JÀÉ"
18 EOF
19
20 : ${MSGCONV=msgconv}
21 ${MSGCONV} --add-location=file --to-code=UTF-8 \
22            -o mco-test7.out mco-test7.po || exit 1
23
24 cat <<\EOF > mco-test7.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=UTF-8\n"
31 "Content-Transfer-Encoding: 8bit\n"
32
33 #: src/msgcmp.c src/msgmerge.c
34 msgid "exactly 2 input files required"
35 msgstr "此功能需要恰好指定兩個輸入檔"
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-test7.ok mco-test7.out >/dev/null
41 result=$?
42
43 exit $result