No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-csharp-2
blobb0b6e5aeb841a2c18b4e9bd810bea41aaed6d70d
1 #!/bin/sh
3 # More tests for C# support: UTF-8 encoded source files
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-cs-2.cs"
9 cat <<\EOF > xg-cs-2.cs
10 class TestCase {
11 public static void Main (String[] args) {
12 Console.WriteLine(GetString("Russian (Русский): Здравствуйте"));
13 Console.WriteLine(GetString("Vietnamese (Tiếng Việt): Chào bạn"));
14 Console.WriteLine(GetString("Japanese (日本語): こんにちは"));
15 Console.WriteLine(GetString("Thai (ภาษาไทย): สวัสดีครับ"));
16 Console.WriteLine(GetString("Script: 𝒞"));
17 Console.WriteLine(GetString("Russian (\u0420\u0443\u0441\u0441\u043a\u0438\u0439): \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435"));
18 Console.WriteLine(GetString("Vietnamese (Ti\u1ebfng Vi\u1ec7t): Ch\u00e0o b\u1ea1n"));
19 Console.WriteLine(GetString("Japanese (\u65e5\u672c\u8a9e): \u3053\u3093\u306b\u3061\u306f"));
20 Console.WriteLine(GetString("Thai (\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22): \u0e2a\u0e27\u0e31\u0e2a\u0e14\u0e35\u0e04\u0e23\u0e31\u0e1a"));
21 Console.WriteLine(GetString("Script: \U0001d49e"));
22 // And now a comment with Русский and 日本語 and Unicode escapes: B\u00f6se B\u00fcbchen
23 Console.WriteLine(GetString("This string has a multilingual comment"));
26 EOF
28 tmpfiles="$tmpfiles xg-cs-2.po"
29 : ${XGETTEXT=xgettext}
30 # delete POT-Creation-Date: line because the date depends on local time.
31 ${XGETTEXT} --output - --add-location -c --from-code=UTF-8 xg-cs-2.cs \
32 | sed '/\"POT-Creation-Date:.*/d' > xg-cs-2.po
33 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
35 tmpfiles="$tmpfiles xg-cs-2.ok"
36 cat <<\EOF > xg-cs-2.ok
37 # SOME DESCRIPTIVE TITLE.
38 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
39 # This file is distributed under the same license as the PACKAGE package.
40 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
42 #, fuzzy
43 msgid ""
44 msgstr ""
45 "Project-Id-Version: PACKAGE VERSION\n"
46 "Report-Msgid-Bugs-To: \n"
47 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
48 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
49 "Language-Team: LANGUAGE <LL@li.org>\n"
50 "MIME-Version: 1.0\n"
51 "Content-Type: text/plain; charset=UTF-8\n"
52 "Content-Transfer-Encoding: 8bit\n"
54 #: xg-cs-2.cs:3 xg-cs-2.cs:8
55 msgid "Russian (Русский): Здравствуйте"
56 msgstr ""
58 #: xg-cs-2.cs:4 xg-cs-2.cs:9
59 msgid "Vietnamese (Tiếng Việt): Chào bạn"
60 msgstr ""
62 #: xg-cs-2.cs:5 xg-cs-2.cs:10
63 msgid "Japanese (日本語): こんにちは"
64 msgstr ""
66 #: xg-cs-2.cs:6 xg-cs-2.cs:11
67 msgid "Thai (ภาษาไทย): สวัสดีครับ"
68 msgstr ""
70 #: xg-cs-2.cs:7 xg-cs-2.cs:12
71 msgid "Script: 𝒞"
72 msgstr ""
74 #. And now a comment with Русский and 日本語 and Unicode escapes: B\u00f6se B\u00fcbchen
75 #: xg-cs-2.cs:14
76 msgid "This string has a multilingual comment"
77 msgstr ""
78 EOF
80 : ${DIFF=diff}
81 ${DIFF} xg-cs-2.ok xg-cs-2.po
82 result=$?
84 rm -fr $tmpfiles
86 exit $result