msgattrib-properties-1 \
msgcat-1 msgcat-2 msgcat-3 msgcat-4 msgcat-5 msgcat-6 msgcat-7 \
msgcat-8 msgcat-9 msgcat-10 msgcat-11 msgcat-12 msgcat-13 msgcat-14 \
- msgcat-15 msgcat-16 msgcat-17 \
+ msgcat-15 msgcat-16 msgcat-17 msgcat-18 \
msgcat-properties-1 msgcat-properties-2 \
msgcat-stringtable-1 \
msgcmp-1 msgcmp-2 msgcmp-3 msgcmp-4 \
msgcomm-8 msgcomm-9 msgcomm-10 msgcomm-11 msgcomm-12 msgcomm-13 \
msgcomm-14 msgcomm-15 msgcomm-16 msgcomm-17 msgcomm-18 msgcomm-19 \
msgcomm-20 msgcomm-21 msgcomm-22 msgcomm-23 msgcomm-24 msgcomm-25 \
- msgcomm-26 \
+ msgcomm-26 msgcomm-27 \
msgconv-1 msgconv-2 msgconv-3 msgconv-4 msgconv-5 msgconv-6 \
msgen-1 msgen-2 msgen-3 \
msgexec-1 msgexec-2 msgexec-3 msgexec-4 \
msgmerge-7 msgmerge-8 msgmerge-9 msgmerge-10 msgmerge-11 msgmerge-12 \
msgmerge-13 msgmerge-14 msgmerge-15 msgmerge-16 msgmerge-17 \
msgmerge-18 msgmerge-19 msgmerge-20 msgmerge-21 msgmerge-22 \
- msgmerge-23 \
+ msgmerge-23 msgmerge-24 \
msgmerge-compendium-1 msgmerge-compendium-2 msgmerge-compendium-3 \
msgmerge-compendium-4 msgmerge-compendium-5 msgmerge-compendium-6 \
msgmerge-properties-1 msgmerge-properties-2 \
xgettext-c-1 xgettext-c-2 xgettext-c-3 xgettext-c-4 xgettext-c-5 \
xgettext-c-6 xgettext-c-7 xgettext-c-8 xgettext-c-9 xgettext-c-10 \
xgettext-c-11 xgettext-c-12 xgettext-c-13 xgettext-c-14 xgettext-c-15 \
- xgettext-c-16 xgettext-c-17 \
+ xgettext-c-16 xgettext-c-17 xgettext-c-18 \
xgettext-csharp-1 xgettext-csharp-2 xgettext-csharp-3 \
xgettext-csharp-4 xgettext-csharp-5 xgettext-csharp-6 \
xgettext-csharp-7 \
--- /dev/null
+#! /bin/sh
+
+# Test msgcat: handling of 'range:' flags.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mcat-test18.in1 mcat-test18.in2"
+cat <<\EOF > mcat-test18.in1
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..6
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..7
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..6
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+cat <<\EOF > mcat-test18.in2
+#, c-format, range: 1..6
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..6
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..7
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+tmpfiles="$tmpfiles mcat-test18.tmp mcat-test18.out"
+rm -f mcat-test18.tmp
+: ${MSGCAT=msgcat}
+${MSGCAT} -o mcat-test18.tmp mcat-test18.in1 mcat-test18.in2
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+LC_ALL=C tr -d '\r' < mcat-test18.tmp > mcat-test18.out
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mcat-test18.ok"
+cat <<\EOF > mcat-test18.ok
+#, c-format
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..7
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..7
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test18.ok mcat-test18.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test handling of format and 'range:' flag.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mcomm-test27.in1 mcomm-test27.in2"
+cat <<EOF > mcomm-test27.in1
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..6
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..7
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..6
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+cat <<EOF > mcomm-test27.in2
+#, c-format, range: 1..6
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..6
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..7
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test27.tmp mcomm-test27.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} -o mcomm-test27.tmp mcomm-test27.in1 mcomm-test27.in2
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+LC_ALL=C tr -d '\r' < mcomm-test27.tmp > mcomm-test27.out
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mcomm-test27.ok"
+cat << EOF > mcomm-test27.ok
+#, c-format
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..7
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..7
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test27.ok mcomm-test27.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test msgmerge and msgcmp: handling of 'range:' flags.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mm-test24.po"
+cat <<\EOF > mm-test24.po
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#, c-format
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] "un jour"
+msgstr[1] "%d jours"
+
+#, c-format, range: 1..6
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] "une semaine et un jour"
+msgstr[1] "une semaine et %d jours"
+
+#, c-format, range: 1..7
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] "deux semaines et un jour"
+msgstr[1] "deux semaines et %d jours"
+
+#, c-format, range: 0..6
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] "trois semaines et un jour"
+msgstr[1] "trois semaines et %d jours"
+
+#, c-format, range: 0..7
+msgid "four weeks and one day"
+msgid_plural "four weeks and %d days"
+msgstr[0] "quatre semaines et un jour"
+msgstr[1] "quatre semaines et %d jours"
+
+#, c-format, range: 1..6
+msgid "five weeks and one day"
+msgid_plural "five weeks and %d days"
+msgstr[0] "cinq semaines et un jour"
+msgstr[1] "cinq semaines et %d jours"
+EOF
+
+tmpfiles="$tmpfiles mm-test24.pot"
+cat <<\EOF > mm-test24.pot
+# 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"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#, c-format, range: 1..6
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..6
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..7
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 1..6
+msgid "four weeks and one day"
+msgid_plural "four weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+
+#, c-format, range: 0..7
+msgid "five weeks and one day"
+msgid_plural "five weeks and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+: ${MSGCMP=msgcmp}
+${MSGCMP} --use-fuzzy --use-untranslated mm-test24.po mm-test24.pot 2>/dev/null
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mm-test24.tmp.po mm-test24.new.po"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q -o mm-test24.tmp.po mm-test24.po mm-test24.pot
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+LC_ALL=C tr -d '\r' < mm-test24.tmp.po > mm-test24.new.po
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mm-test24.ok"
+cat <<\EOF > mm-test24.ok
+msgid ""
+msgstr ""
+"Report-Msgid-Bugs-To: \n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#, c-format, range: 1..6
+msgid "one day"
+msgid_plural "%d days"
+msgstr[0] "un jour"
+msgstr[1] "%d jours"
+
+#, fuzzy, c-format
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] "une semaine et un jour"
+msgstr[1] "une semaine et %d jours"
+
+#, fuzzy, c-format, range: 0..6
+msgid "two weeks and one day"
+msgid_plural "two weeks and %d days"
+msgstr[0] "deux semaines et un jour"
+msgstr[1] "deux semaines et %d jours"
+
+#, fuzzy, c-format, range: 1..7
+msgid "three weeks and one day"
+msgid_plural "three weeks and %d days"
+msgstr[0] "trois semaines et un jour"
+msgstr[1] "trois semaines et %d jours"
+
+#, c-format, range: 1..6
+msgid "four weeks and one day"
+msgid_plural "four weeks and %d days"
+msgstr[0] "quatre semaines et un jour"
+msgstr[1] "quatre semaines et %d jours"
+
+#, fuzzy, c-format, range: 0..7
+msgid "five weeks and one day"
+msgid_plural "five weeks and %d days"
+msgstr[0] "cinq semaines et un jour"
+msgstr[1] "cinq semaines et %d jours"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test24.ok mm-test24.new.po
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+: ${MSGCMP=msgcmp}
+${MSGCMP} --use-fuzzy --use-untranslated mm-test24.new.po mm-test24.pot
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+rm -fr $tmpfiles
+
+exit 0
--- /dev/null
+#! /bin/sh
+
+# Test C support: extraction of 'range:' flags.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-c-18.c"
+cat <<\EOF > xg-c-18.c
+if (days > 7 && days < 14)
+ /* xgettext: range: 1..6 */
+ printf (ngettext ("one week and one day", "one week and %d days",
+ days - 7),
+ days - 7);
+EOF
+
+tmpfiles="$tmpfiles xg-c-18.tmp.po xg-c-18.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location -d xg-c-18.tmp xg-c-18.c
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+LC_ALL=C tr -d '\r' < xg-c-18.tmp.po > xg-c-18.po
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles xg-c-18.ok"
+cat <<EOF > xg-c-18.ok
+#, c-format, range: 1..6
+msgid "one week and one day"
+msgid_plural "one week and %d days"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-c-18.ok xg-c-18.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result