~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to gettext-tools/tests/msgconv-1

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Test conversion from BIG5 to UTF-8.
 
4
 
 
5
tmpfiles=""
 
6
trap 'rm -fr $tmpfiles' 1 2 3 15
 
7
 
 
8
tmpfiles="$tmpfiles mco-test1.po"
 
9
cat <<\EOF > mco-test1.po
 
10
# Chinese translation for GNU gettext messages.
 
11
#
 
12
msgid ""
 
13
msgstr ""
 
14
"MIME-Version: 1.0\n"
 
15
"Content-Type: text/plain; charset=big5\n"
 
16
"Content-Transfer-Encoding: 8bit\n"
 
17
 
 
18
#: src/msgcmp.c:155 src/msgmerge.c:273
 
19
msgid "exactly 2 input files required"
 
20
msgstr "���\��ݭn��n���w��ӿ�J��"
 
21
EOF
 
22
 
 
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; }
 
27
 
 
28
tmpfiles="$tmpfiles mco-test1.ok"
 
29
cat <<\EOF > mco-test1.ok
 
30
# Chinese translation for GNU gettext messages.
 
31
#
 
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"
 
37
 
 
38
#: src/msgcmp.c:155 src/msgmerge.c:273
 
39
msgid "exactly 2 input files required"
 
40
msgstr "此功能需要恰好指定兩個輸入檔"
 
41
EOF
 
42
 
 
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=$?
 
47
 
 
48
rm -fr $tmpfiles
 
49
 
 
50
exit $result