No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-python-1
blob817cc99d3266f0fb7638c1789b7abbce4aa5f99f
1 #!/bin/sh
3 # Test of Python support.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-py-1.py"
9 cat <<\EOF > xg-py-1.py
10 # interpret_ansic = true, interpret_unicode = false
11 _("abc\
12 \\def\'ghi\"jkl\a\b\f\n\r\t\v x\040x\x7ey\u0142\U00010123\N{LATIN SMALL LETTER Z}");
14 # interpret_ansic = false, interpret_unicode = false
15 _(r"abc\
16 \\def\'ghi\"jkl\a\b\f\n\r\t\v x\040x\x7ey\u0142\U00010123\N{LATIN SMALL LETTER Z}");
18 # interpret_ansic = true, interpret_unicode = true
19 _(u"abc\
20 \\def\'ghi\"jkl\a\b\f\n\r\t\v x\040x\x7ey\u0142\U00010123\N{LATIN SMALL LETTER Z}");
22 # interpret_ansic = false, interpret_unicode = true
23 _(ur"abc\
24 \\def\'ghi\"jkl\a\b\f\n\r\t\v x\040x\x7ey\u0142\U00010123\N{LATIN SMALL LETTER Z}");
25 EOF
27 tmpfiles="$tmpfiles xg-py-1.err xg-py-1.tmp xg-py-1.pot"
28 : ${XGETTEXT=xgettext}
29 ${XGETTEXT} --add-comments --no-location -o xg-py-1.tmp xg-py-1.py 2>xg-py-1.err
30 test $? = 0 || { cat xg-py-1.err; rm -fr $tmpfiles; exit 1; }
31 grep -v 'POT-Creation-Date' < xg-py-1.tmp > xg-py-1.pot
33 tmpfiles="$tmpfiles xg-py-1.ok"
34 cat <<\EOF > xg-py-1.ok
35 # SOME DESCRIPTIVE TITLE.
36 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
37 # This file is distributed under the same license as the PACKAGE package.
38 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
40 #, fuzzy
41 msgid ""
42 msgstr ""
43 "Project-Id-Version: PACKAGE VERSION\n"
44 "Report-Msgid-Bugs-To: \n"
45 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
46 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
47 "Language-Team: LANGUAGE <LL@li.org>\n"
48 "MIME-Version: 1.0\n"
49 "Content-Type: text/plain; charset=UTF-8\n"
50 "Content-Transfer-Encoding: 8bit\n"
52 #. interpret_ansic = true, interpret_unicode = false
53 msgid ""
54 "abc\\def'ghi\"jkl\a\b\f\n"
55 "\r\t\v x x~y\\u0142\\U00010123\\N{LATIN SMALL LETTER Z}"
56 msgstr ""
58 #. interpret_ansic = false, interpret_unicode = false
59 msgid ""
60 "abc\\\n"
61 "\\\\def\\'ghi\\\"jkl\\a\\b\\f\\n\\r\\t\\v x\\040x\\x7ey\\u0142\\U00010123\\N"
62 "{LATIN SMALL LETTER Z}"
63 msgstr ""
65 #. interpret_ansic = true, interpret_unicode = true
66 msgid ""
67 "abc\\def'ghi\"jkl\a\b\f\n"
68 "\r\t\v x x~ył𐄣z"
69 msgstr ""
71 #. interpret_ansic = false, interpret_unicode = true
72 msgid ""
73 "abc\\\n"
74 "\\\\def\\'ghi\\\"jkl\\a\\b\\f\\n\\r\\t\\v x\\040x\\x7eył\\U00010123\\N{LATIN "
75 "SMALL LETTER Z}"
76 msgstr ""
77 EOF
79 : ${DIFF=diff}
80 ${DIFF} xg-py-1.ok xg-py-1.pot
81 result=$?
83 rm -fr $tmpfiles
85 exit $result