No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-csharp-5
blob03e4b15272e18106a97a21e91935622c4c1b9109
1 #!/bin/sh
3 # Test C# support: --add-comments option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-cs-5.cs"
9 cat <<EOF > xg-cs-5.cs
10 // This comment will not be extracted.
11 Console.WriteLine(GetString("help"));
12 // TRANSLATORS: This is an extracted comment.
13 Console.WriteLine(GetString("me"));
14 /* Not extracted either. */
15 Console.WriteLine(GetString("Hey Jude"));
16 /* TRANSLATORS:
17 Nickname of the Beatles
19 Console.WriteLine(GetString("The Fabulous Four"));
20 /* TRANSLATORS: The strings get concatenated. */
21 Console.WriteLine(GetString("there is not enough" +
22 " room on a single line for this entire long, " // confusing, eh?
23 + "verbose string"));
24 EOF
26 tmpfiles="$tmpfiles xg-cs-5.po"
27 : ${XGETTEXT=xgettext}
28 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
29 xg-cs-5.cs -d xg-cs-5
30 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
32 tmpfiles="$tmpfiles xg-cs-5.ok"
33 cat <<EOF > xg-cs-5.ok
34 msgid "help"
35 msgstr ""
37 #. TRANSLATORS: This is an extracted comment.
38 msgid "me"
39 msgstr ""
41 msgid "Hey Jude"
42 msgstr ""
44 #. TRANSLATORS:
45 #. Nickname of the Beatles
47 msgid "The Fabulous Four"
48 msgstr ""
50 #. TRANSLATORS: The strings get concatenated.
51 msgid ""
52 "there is not enough room on a single line for this entire long, verbose "
53 "string"
54 msgstr ""
55 EOF
57 : ${DIFF=diff}
58 ${DIFF} xg-cs-5.ok xg-cs-5.po
59 result=$?
61 rm -fr $tmpfiles
63 exit $result