• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test of --csharp option.
5
6# Test whether we can compile and execute C# programs.
7test "${CSHARP_CHOICE}" != no || {
8  echo "Skipping test: configured with --disable-csharp"
9  Exit 77
10}
11test "${BUILDCSHARP}" = yes || {
12  echo "Skipping test: C# compiler not found"
13  Exit 77
14}
15test "${TESTCSHARP}" = yes || {
16  echo "Skipping test: C# engine not found"
17  Exit 77
18}
19
20test -d mu-cs-1 || mkdir mu-cs-1
21
22cat <<\EOF > mu-cs-1/fr.po
23msgid ""
24msgstr ""
25"Content-Type: text/plain; charset=ISO-8859-1\n"
26"Plural-Forms: nplurals=2; plural=(n > 1);\n"
27
28msgid "'Your command, please?', asked the waiter."
29msgstr "�Votre commande, s'il vous plait�, dit le gar�on."
30
31# Les gateaux allemands sont les meilleurs du monde.
32#, csharp-format
33msgid "a piece of cake"
34msgid_plural "{0} pieces of cake"
35msgstr[0] "un morceau de gateau"
36msgstr[1] "{0} morceaux de gateau"
37
38# Reverse the arguments.
39#, csharp-format
40msgid "{0} is replaced by {1}."
41msgstr "{1} remplace {0}."
42
43# A proximity measure.
44msgid "Close"
45msgstr "Proche"
46
47# A menu entry.
48msgctxt "File"
49msgid "Close"
50msgstr "Fermer"
51EOF
52
53: ${MSGFMT=msgfmt}
54GETTEXTCSHARPLIBDIR=../../../gettext-runtime/intl-csharp \
55${MSGFMT} --csharp -d mu-cs-1 -r prog -l fr mu-cs-1/fr.po || Exit 1
56
57: ${MSGUNFMT=msgunfmt}
58GETTEXTCSHARPEXEDIR=../../src \
59GETTEXTCSHARPLIBDIR=../../../gettext-runtime/intl-csharp \
60${MSGUNFMT} --csharp -d mu-cs-1 -r prog -l fr -o mu-cs-1/prog.out || Exit 1
61
62: ${MSGCAT=msgcat}
63${MSGCAT} -s -o mu-cs-1/prog.sort mu-cs-1/prog.out || Exit 1
64
65cat <<\EOF > mu-cs-1/prog.ok
66msgid ""
67msgstr ""
68"Content-Type: text/plain; charset=UTF-8\n"
69"Plural-Forms: nplurals=2; plural=(n > 1);\n"
70
71msgid "'Your command, please?', asked the waiter."
72msgstr "«Votre commande, s'il vous plait», dit le garçon."
73
74msgid "Close"
75msgstr "Proche"
76
77msgctxt "File"
78msgid "Close"
79msgstr "Fermer"
80
81msgid "a piece of cake"
82msgid_plural "{0} pieces of cake"
83msgstr[0] "un morceau de gateau"
84msgstr[1] "{0} morceaux de gateau"
85
86msgid "{0} is replaced by {1}."
87msgstr "{1} remplace {0}."
88EOF
89: ${DIFF=diff}
90${DIFF} mu-cs-1/prog.ok mu-cs-1/prog.sort || Exit 1
91
92Exit 0
93