1#!/bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3#
4# Some tests for java plural keyword support
5#
6
7cat <<EOF > xg-j-4.java
8class TestCase {
9    public TestCase() {
10        Bundle test = Bundle.getBundle();
11        test.ngettext(test, "test 1", "plural test");
12    }
13}
14EOF
15
16: ${XGETTEXT=xgettext}
17${XGETTEXT} --omit-header --no-location --keyword=ngettext:2,3 \
18  -d xg-j-4.tmp xg-j-4.java || Exit 1
19LC_ALL=C tr -d '\r' < xg-j-4.tmp.po > xg-j-4.po || Exit 1
20
21cat <<EOF > xg-j-4.ok
22msgid "test 1"
23msgid_plural "plural test"
24msgstr[0] ""
25msgstr[1] ""
26EOF
27
28: ${DIFF=diff}
29${DIFF} xg-j-4.ok xg-j-4.po
30result=$?
31
32exit $result
33