summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-11-03 21:16:40 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:11:12 +0200
commitc640c85f7a86c5d9fdae087c82e6de3eb3994498 (patch)
treeaf6a72b61b20ecfce7b3ff466704dab955b771a6 /gettext-tools/tests/xgettext-4
parent449509cacf9b33de88e4ba0e452867008f8cba43 (diff)
downloadexternal_gettext-c640c85f7a86c5d9fdae087c82e6de3eb3994498.zip
external_gettext-c640c85f7a86c5d9fdae087c82e6de3eb3994498.tar.gz
external_gettext-c640c85f7a86c5d9fdae087c82e6de3eb3994498.tar.bz2
Move xgettext-14 to xgettext-4.
Diffstat (limited to 'gettext-tools/tests/xgettext-4')
-rwxr-xr-xgettext-tools/tests/xgettext-447
1 files changed, 47 insertions, 0 deletions
diff --git a/gettext-tools/tests/xgettext-4 b/gettext-tools/tests/xgettext-4
new file mode 100755
index 0000000..3e0db31
--- /dev/null
+++ b/gettext-tools/tests/xgettext-4
@@ -0,0 +1,47 @@
+#! /bin/sh
+
+# Test --foreign-user
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test14.in.c"
+cat <<EOF > xg-test14.in.c
+_("extract me")
+EOF
+
+tmpfiles="$tmpfiles xg-test14.po"
+: ${XGETTEXT=xgettext}
+# delete POT-Creation-Date: line because the date depends on local time.
+${XGETTEXT} --output - --foreign-user --no-location -k_ xg-test14.in.c \
+ | sed '/\"POT-Creation-Date:.*/d' > xg-test14.po
+
+tmpfiles="$tmpfiles xg-test14.ok"
+cat <<EOF > xg-test14.ok
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "extract me"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test14.ok xg-test14.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result