2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test various msginit options.
5 cat <<\EOF > mi-test3.pot
6 # SOME DESCRIPTIVE TITLE.
7 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
8 # This file is distributed under the same license as the PACKAGE package.
9 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
14 "Project-Id-Version: PACKAGE VERSION\n"
15 "Report-Msgid-Bugs-To: \n"
16 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
17 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
18 "Language-Team: LANGUAGE <LL@li.org>\n"
21 "Content-Type: text/plain; charset=CHARSET\n"
22 "Content-Transfer-Encoding: 8bit\n"
25 msgid "'Your command, please?', asked the waiter."
29 msgid "a piece of cake"
30 msgid_plural "%d pieces of cake"
35 msgid "%s is replaced by %s."
40 GETTEXTLIBDIR="$abs_top_srcdir"/src ${MSGINIT} -l ga_IE --no-translator -o mi-test3.tmp 2>mi-test3.err
41 test $? = 0 || { cat mi-test3.err 1>&2; exit 1; }
43 grep "Project-Id-Version: gt-msginit " mi-test3.tmp 2>&1 >/dev/null || exit 1
45 # The charset stored in the header entry is the locale encoding of the gl_IE
46 # locale, which is system dependent, or ASCII if the locale does not exist.
48 # Project-Id-Version contains version constructed from a temporary
50 sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test3.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test3.out || exit 1
51 cat <<\EOF > mi-test3.ok
52 "Last-Translator: Automatically generated\n"
53 "Language-Team: none\n"
56 "Content-Type: text/plain; charset=ASCII\n"
57 "Content-Transfer-Encoding: 8bit\n"
58 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
61 msgid "'Your command, please?', asked the waiter."
65 msgid "a piece of cake"
66 msgid_plural "%d pieces of cake"
72 msgid "%s is replaced by %s."
77 ${DIFF} mi-test3.ok mi-test3.out