No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgunfmt-csharp-1
blob6829596b055327b06f3c1cc47dc292492770f04c
1 #! /bin/sh
3 # Test of --csharp option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 # Test whether we can compile and execute C# programs.
9 test "${TESTCSHARP}" = yes || exit 77
11 tmpfiles="$tmpfiles fr.po"
12 cat <<\EOF > fr.po
13 msgid ""
14 msgstr ""
15 "Content-Type: text/plain; charset=ISO-8859-1\n"
16 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18 msgid "'Your command, please?', asked the waiter."
19 msgstr "«Votre commande, s'il vous plait», dit le garçon."
21 # Les gateaux allemands sont les meilleurs du monde.
22 #, csharp-format
23 msgid "a piece of cake"
24 msgid_plural "{0} pieces of cake"
25 msgstr[0] "un morceau de gateau"
26 msgstr[1] "{0} morceaux de gateau"
28 # Reverse the arguments.
29 #, csharp-format
30 msgid "{0} is replaced by {1}."
31 msgstr "{1} remplace {0}."
32 EOF
34 tmpfiles="$tmpfiles fr/prog.resources.dll"
35 : ${MSGFMT=msgfmt}
36 GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \
37 ${MSGFMT} --csharp -d . -r prog -l fr fr.po || exit 1
39 tmpfiles="$tmpfiles prog.out"
40 : ${MSGUNFMT=msgunfmt}
41 GETTEXTCSHARPEXEDIR=../src \
42 GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \
43 ${MSGUNFMT} --csharp -d . -r prog -l fr -o prog.out || exit 1
45 tmpfiles="$tmpfiles prog.sort"
46 : ${MSGCAT=msgcat}
47 ${MSGCAT} -s prog.out -o prog.sort || exit 1
49 tmpfiles="$tmpfiles prog.ok"
50 cat <<\EOF > prog.ok
51 msgid ""
52 msgstr ""
53 "Content-Type: text/plain; charset=UTF-8\n"
54 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
56 msgid "'Your command, please?', asked the waiter."
57 msgstr "«Votre commande, s'il vous plait», dit le garçon."
59 msgid "a piece of cake"
60 msgid_plural "{0} pieces of cake"
61 msgstr[0] "un morceau de gateau"
62 msgstr[1] "{0} morceaux de gateau"
64 msgid "{0} is replaced by {1}."
65 msgstr "{1} remplace {0}."
66 EOF
67 : ${DIFF=diff}
68 ${DIFF} prog.ok prog.sort || exit 1
70 rm -fr $tmpfiles
72 exit 0