No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-5
blob71f74580161e9eca24f46cc3e090216f93fa6407
1 #! /bin/sh
3 # Test extraction of non-ASCII msgids.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-test5.c"
9 cat <<EOF > xg-test5.c
10 void foo (int option)
12 printf (_("%s: neznámý pøepínaè -- %c\n"), option);
13 printf (_("%s: pøepínaè vy¾aduje argument -- %c\n"), option);
15 EOF
17 tmpfiles="$tmpfiles xg-test5.po"
18 : ${XGETTEXT=xgettext}
19 ${XGETTEXT} --no-location -k_ -o xg-test5.po xg-test5.c 2>/dev/null
20 test $? = 1 || { rm -fr $tmpfiles; exit 1; }
21 ${XGETTEXT} --no-location -k_ --from-code=iso-8859-2 -o xg-test5.po xg-test5.c
22 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
24 tmpfiles="$tmpfiles xg-test5.pot"
25 sed -e '/POT-Creation-Date/d' < xg-test5.po > xg-test5.pot
27 tmpfiles="$tmpfiles xg-test5.ok"
28 cat <<EOF > xg-test5.ok
29 # SOME DESCRIPTIVE TITLE.
30 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
31 # This file is distributed under the same license as the PACKAGE package.
32 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
34 #, fuzzy
35 msgid ""
36 msgstr ""
37 "Project-Id-Version: PACKAGE VERSION\n"
38 "Report-Msgid-Bugs-To: \n"
39 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
40 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
41 "Language-Team: LANGUAGE <LL@li.org>\n"
42 "MIME-Version: 1.0\n"
43 "Content-Type: text/plain; charset=UTF-8\n"
44 "Content-Transfer-Encoding: 8bit\n"
46 #, c-format
47 msgid "%s: neznámý přepínač -- %c\n"
48 msgstr ""
50 #, c-format
51 msgid "%s: přepínač vyžaduje argument -- %c\n"
52 msgstr ""
53 EOF
55 : ${DIFF=diff}
56 ${DIFF} xg-test5.ok xg-test5.pot
57 result=$?
59 rm -fr $tmpfiles
61 exit $result