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

« back to all changes in this revision

Viewing changes to gettext-tools/tests/xgettext-java-3

  • 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
# Some tests for java plural keyword support
 
4
#
 
5
 
 
6
tmpfiles=""
 
7
trap 'rm -fr $tmpfiles' 1 2 3 15
 
8
 
 
9
tmpfiles="$tmpfiles xg-j-3.java"
 
10
cat <<EOF > xg-j-3.java
 
11
class TestCase {
 
12
    public TestCase() {
 
13
        Bundle test = Bundle.getBundle();
 
14
        test.ngettext("test 1", "plural test");
 
15
    }
 
16
}
 
17
EOF
 
18
 
 
19
tmpfiles="$tmpfiles xg-j-3.po"
 
20
: ${XGETTEXT=xgettext}
 
21
${XGETTEXT} --omit-header --no-location -d xg-j-3 xg-j-3.java
 
22
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
23
 
 
24
tmpfiles="$tmpfiles xg-j-3.ok"
 
25
cat <<EOF > xg-j-3.ok
 
26
msgid "test 1"
 
27
msgid_plural "plural test"
 
28
msgstr[0] ""
 
29
msgstr[1] ""
 
30
EOF
 
31
 
 
32
: ${DIFF=diff}
 
33
${DIFF} xg-j-3.ok xg-j-3.po
 
34
result=$?
 
35
 
 
36
rm -fr $tmpfiles
 
37
 
 
38
exit $result