No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-4
blobe6f7c92318741756d3e1c369db8bd67ed2e091c2
1 #! /bin/sh
3 # Test --foreign-user
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-test4.in.c"
9 cat <<EOF > xg-test4.in.c
10 _("extract me")
11 EOF
13 tmpfiles="$tmpfiles xg-test4.po"
14 : ${XGETTEXT=xgettext}
15 # delete POT-Creation-Date: line because the date depends on local time.
16 ${XGETTEXT} --output - --foreign-user --no-location -k_ xg-test4.in.c \
17 | sed '/\"POT-Creation-Date:.*/d' > xg-test4.po
19 tmpfiles="$tmpfiles xg-test4.ok"
20 cat <<EOF > xg-test4.ok
21 # SOME DESCRIPTIVE TITLE.
22 # This file is put in the public domain.
23 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
25 #, fuzzy
26 msgid ""
27 msgstr ""
28 "Project-Id-Version: PACKAGE VERSION\n"
29 "Report-Msgid-Bugs-To: \n"
30 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
31 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
32 "Language-Team: LANGUAGE <LL@li.org>\n"
33 "MIME-Version: 1.0\n"
34 "Content-Type: text/plain; charset=CHARSET\n"
35 "Content-Transfer-Encoding: 8bit\n"
37 msgid "extract me"
38 msgstr ""
39 EOF
41 : ${DIFF=diff}
42 ${DIFF} xg-test4.ok xg-test4.po
43 result=$?
45 rm -fr $tmpfiles
47 exit $result