No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-3
blobb2dcef1df160c9d9533da18670840b0b0fdcb0aa
1 #! /bin/sh
3 # When a header entry is provided by xgettext, it overrides any msgid ""
4 # present in the input.
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles="$tmpfiles xg-test3.in.c"
10 cat <<EOF > xg-test3.in.c
11 This is a test of the xgettext functionality.
12 /* xgettext:no-c-format */
13 _("extract me")
14 Sometimes keywords can be spread apart
15 xgettext:no-c-format
16 _ ( "what about me" )
17 And even further on accasion
20 "hello"
23 /* no additional empty strings */
24 _("")
25 EOF
27 tmpfiles="$tmpfiles xg-test3.po"
28 : ${XGETTEXT=xgettext}
29 # delete POT-Creation-Date: line because the date depends on local time.
30 ${XGETTEXT} --output - --no-location -k_ xg-test3.in.c 2>/dev/null \
31 | sed '/\"POT-Creation-Date:.*/d' > xg-test3.po
33 tmpfiles="$tmpfiles xg-test3.ok"
34 cat <<EOF > xg-test3.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=CHARSET\n"
50 "Content-Transfer-Encoding: 8bit\n"
52 #, no-c-format
53 msgid "extract me"
54 msgstr ""
56 msgid "what about me"
57 msgstr ""
59 msgid "hello"
60 msgstr ""
61 EOF
63 : ${DIFF=diff}
64 ${DIFF} xg-test3.ok xg-test3.po
65 result=$?
67 rm -fr $tmpfiles
69 exit $result