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