No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgconv-1
blob960be285a8d07264428804273e510afedcbe7adf
1 #! /bin/sh
3 # Test conversion from BIG5 to UTF-8.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mco-test1.po"
9 cat <<\EOF > mco-test1.po
10 # Chinese translation for GNU gettext messages.
12 msgid ""
13 msgstr ""
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=big5\n"
16 "Content-Transfer-Encoding: 8bit\n"
18 #: src/msgcmp.c:155 src/msgmerge.c:273
19 msgid "exactly 2 input files required"
20 msgstr "¦¹¥\¯à»Ý­n«ê¦n«ü©w¨â­Ó¿é¤JÀÉ"
21 EOF
23 tmpfiles="$tmpfiles mco-test1.out"
24 : ${MSGCONV=msgconv}
25 ${MSGCONV} --to-code=UTF-8 mco-test1.po -o mco-test1.out
26 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
28 tmpfiles="$tmpfiles mco-test1.ok"
29 cat <<\EOF > mco-test1.ok
30 # Chinese translation for GNU gettext messages.
32 msgid ""
33 msgstr ""
34 "MIME-Version: 1.0\n"
35 "Content-Type: text/plain; charset=UTF-8\n"
36 "Content-Transfer-Encoding: 8bit\n"
38 #: src/msgcmp.c:155 src/msgmerge.c:273
39 msgid "exactly 2 input files required"
40 msgstr "此功能需要恰好指定兩個輸入檔"
41 EOF
43 : ${DIFF=diff}
44 # Redirect stdout, so as not to fill the user's screen with non-ASCII bytes.
45 ${DIFF} mco-test1.ok mco-test1.out >/dev/null
46 result=$?
48 rm -fr $tmpfiles
50 exit $result