diff options
Diffstat (limited to 'gettext-tools/tests/xgettext-vala-1')
-rwxr-xr-x | gettext-tools/tests/xgettext-vala-1 | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/gettext-tools/tests/xgettext-vala-1 b/gettext-tools/tests/xgettext-vala-1 index ce63611..19bfecc 100755 --- a/gettext-tools/tests/xgettext-vala-1 +++ b/gettext-tools/tests/xgettext-vala-1 @@ -75,5 +75,64 @@ EOF : ${DIFF=diff} ${DIFF} xg-vala-1.ok xg-vala-1.pot result=$? +test $result = 0 || exit $result -exit $result +# Test --extract-all option. +${XGETTEXT} --extract-all --add-comments --no-location -o xg-vala-1.tmp xg-vala-1.vala 2>xg-vala-1.err +test $? = 0 || { cat xg-vala-1.err; exit 1; } +# Don't simplify this to "grep ... < xg-vala-1.tmp", otherwise OpenBSD 4.0 grep +# only outputs "Binary file (standard input) matches". +cat xg-vala-1.tmp | grep -v 'POT-Creation-Date' | LC_ALL=C tr -d '\r' > xg-vala-1.pot + +cp xg-vala-1.pot .. +cat <<\EOF > xg-vala-1.all.ok +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# 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" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Simple string, no gettext needed" +msgstr "" + +#. This is a C++ style comment +msgid "Extract this first string" +msgstr "" + +msgid "Prefix _(" +msgstr "" + +msgid "Extract this second string" +msgstr "" + +msgid ") Postfix" +msgstr "" + +msgid "Extract this thirth string" +msgstr "" + +msgid "" +"Extract this\n" +" \"\"\\a\n" +" fourth string" +msgstr "" + +msgid "Extract this ⑤th string" +msgstr "" +EOF + +${DIFF} xg-vala-1.all.ok xg-vala-1.pot +result=$? +test $result = 0 || exit $result |