3 # Test of Python support.
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
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
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
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
24 \\def\'ghi\"jkl\a\b\f\n\r\t\v x\040x\x7ey\u0142\U00010123\N{LATIN SMALL LETTER Z}");
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.
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"
49 "Content-Type: text/plain; charset=UTF-8\n"
50 "Content-Transfer-Encoding: 8bit\n"
52 #. interpret_ansic = true, interpret_unicode = false
54 "abc\\def'ghi\"jkl\a\b\f\n"
55 "\r\t\v x x~y\\u0142\\U00010123\\N{LATIN SMALL LETTER Z}"
58 #. interpret_ansic = false, interpret_unicode = false
61 "\\\\def\\'ghi\\\"jkl\\a\\b\\f\\n\\r\\t\\v x\\040x\\x7ey\\u0142\\U00010123\\N"
62 "{LATIN SMALL LETTER Z}"
65 #. interpret_ansic = true, interpret_unicode = true
67 "abc\\def'ghi\"jkl\a\b\f\n"
71 #. interpret_ansic = false, interpret_unicode = true
74 "\\\\def\\'ghi\\\"jkl\\a\\b\\f\\n\\r\\t\\v x\\040x\\x7eył\\U00010123\\N{LATIN "
80 ${DIFF} xg-py-1.ok xg-py-1.pot