No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-csharp-4
blob8189fd713730caf39a78060a9feb9b3db02c6e9c
1 #!/bin/sh
3 # Tests for C# plural keyword support
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-cs-4.cs"
9 cat <<EOF > xg-cs-4.cs
10 class TestCase {
11 public static void Main (String[] args) {
12 GetPluralString("test 1", "plural test");
13 MyPluralString (context, "I've 1", "you've lost");
16 EOF
18 tmpfiles="$tmpfiles xg-cs-4.po"
19 : ${XGETTEXT=xgettext}
20 ${XGETTEXT} --omit-header --no-location --keyword=MyPluralString:2,3 -d xg-cs-4 xg-cs-4.cs
21 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
23 tmpfiles="$tmpfiles xg-cs-4.ok"
24 cat <<EOF > xg-cs-4.ok
25 msgid "test 1"
26 msgid_plural "plural test"
27 msgstr[0] ""
28 msgstr[1] ""
30 msgid "I've 1"
31 msgid_plural "you've lost"
32 msgstr[0] ""
33 msgstr[1] ""
34 EOF
36 : ${DIFF=diff}
37 ${DIFF} xg-cs-4.ok xg-cs-4.po
38 result=$?
40 rm -fr $tmpfiles
42 exit $result