tests: Reorganize msgmerge tests.

* gettext-tools/tests/msgmerge-domain-1: Renamed from gettext-tools/tests/msgmerge-7.
* gettext-tools/tests/msgmerge-domain-2: Renamed from gettext-tools/tests/msgmerge-8.
* gettext-tools/tests/msgmerge-charset-1: Renamed from gettext-tools/tests/msgmerge-6.
* gettext-tools/tests/msgmerge-charset-2: Renamed from gettext-tools/tests/msgmerge-14.
* gettext-tools/tests/msgmerge-charset-3: Renamed from gettext-tools/tests/msgmerge-16.
* gettext-tools/tests/msgmerge-format-1: Renamed from gettext-tools/tests/msgmerge-13.
* gettext-tools/tests/msgmerge-format-2: Renamed from gettext-tools/tests/msgmerge-21.
* gettext-tools/tests/msgmerge-format-3: Renamed from gettext-tools/tests/msgmerge-28.
* gettext-tools/tests/msgmerge-plural-1: Renamed from gettext-tools/tests/msgmerge-10.
* gettext-tools/tests/msgmerge-plural-2: Renamed from gettext-tools/tests/msgmerge-11.
* gettext-tools/tests/msgmerge-plural-3: Renamed from gettext-tools/tests/msgmerge-12.
* gettext-tools/tests/msgmerge-plural-4: Renamed from gettext-tools/tests/msgmerge-22.
* gettext-tools/tests/msgmerge-plural-5: Renamed from gettext-tools/tests/msgmerge-23.
* gettext-tools/tests/msgmerge-plural-6: Renamed from gettext-tools/tests/msgmerge-24.
* gettext-tools/tests/Makefile.am (TESTS): Update.
This commit is contained in:
Bruno Haible 2024-10-13 18:10:52 +02:00
parent d6a757e166
commit d8b3785fb4
15 changed files with 110 additions and 108 deletions

View File

@ -61,14 +61,16 @@ TESTS = gettext-1 gettext-2 \
msggrep-1 msggrep-2 msggrep-3 msggrep-4 msggrep-5 msggrep-6 msggrep-7 \
msggrep-8 msggrep-9 msggrep-10 msggrep-11 \
msginit-1 msginit-2 msginit-3 msginit-4 \
msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgmerge-6 \
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-24 msgmerge-25 msgmerge-26 msgmerge-27 \
msgmerge-28 msgmerge-29 \
msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgmerge-9 \
msgmerge-15 msgmerge-17 msgmerge-18 msgmerge-19 msgmerge-20 \
msgmerge-25 msgmerge-26 msgmerge-27 msgmerge-29 \
msgmerge-charset-1 msgmerge-charset-2 msgmerge-charset-3 \
msgmerge-compendium-1 msgmerge-compendium-2 msgmerge-compendium-3 \
msgmerge-compendium-4 msgmerge-compendium-5 msgmerge-compendium-6 \
msgmerge-domain-1 msgmerge-domain-2 \
msgmerge-format-1 msgmerge-format-2 msgmerge-format-3 \
msgmerge-plural-1 msgmerge-plural-2 msgmerge-plural-3 \
msgmerge-plural-4 msgmerge-plural-5 msgmerge-plural-6 \
msgmerge-properties-1 msgmerge-properties-2 \
msgmerge-update-1 msgmerge-update-2 msgmerge-update-3 \
msgmerge-update-4 \

View File

@ -3,7 +3,7 @@
# Test non-ASCII character at the end of msgstr. (Triggered a glibc-2.1 bug.)
cat <<\EOF > mm-test6.in1.po
cat <<\EOF > mm-ch-1.in1.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -24,7 +24,7 @@ msgid "white"
msgstr "weiß"
EOF
cat <<\EOF > mm-test6.in2.po
cat <<\EOF > mm-ch-1.in2.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -55,10 +55,10 @@ EOF
: ${MSGMERGE=msgmerge}
LC_MESSAGES=C LC_ALL= \
${MSGMERGE} -q -o mm-test6.tmp mm-test6.in1.po mm-test6.in2.po || Exit 1
LC_ALL=C tr -d '\r' < mm-test6.tmp > mm-test6.out || Exit 1
${MSGMERGE} -q -o mm-ch-1.tmp mm-ch-1.in1.po mm-ch-1.in2.po || Exit 1
LC_ALL=C tr -d '\r' < mm-ch-1.tmp > mm-ch-1.out || Exit 1
cat <<\EOF > mm-test6.ok
cat <<\EOF > mm-ch-1.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -89,7 +89,7 @@ msgstr ""
EOF
: ${DIFF=diff}
${DIFF} mm-test6.ok mm-test6.out
${DIFF} mm-ch-1.ok mm-ch-1.out
result=$?
exit $result

View File

@ -5,7 +5,7 @@
# encoding (that was produced from an older version of ref.pot, in ASCII
# encoding).
cat <<\EOF > mm-test14-ru.po
cat <<\EOF > mm-ch-2-ru.po
# Russian messages for CLISP
# Copyright (C) 1998 Free Software Foundation, Inc.
# Eduard Haritonov <hed@iis.nsk.su>, 1998.
@ -27,7 +27,7 @@ msgid "Division durch Null"
msgstr "ÄÅÌÅÎÉÅ ÎÁ ÎÕÌØ"
EOF
cat <<\EOF > mm-test14.pot
cat <<\EOF > mm-ch-2.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
@ -55,10 +55,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test14.tmp mm-test14-ru.po mm-test14.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test14.tmp > mm-test14.out || Exit 1
${MSGMERGE} -q -o mm-ch-2.tmp mm-ch-2-ru.po mm-ch-2.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-ch-2.tmp > mm-ch-2.out || Exit 1
cat <<\EOF > mm-test14.ok
cat <<\EOF > mm-ch-2.ok
# Russian messages for CLISP
# Copyright (C) 1998 Free Software Foundation, Inc.
# Eduard Haritonov <hed@iis.nsk.su>, 1998.
@ -86,7 +86,7 @@ msgstr ""
EOF
: ${DIFF=diff}
${DIFF} mm-test14.ok mm-test14.out
${DIFF} mm-ch-2.ok mm-ch-2.out
result=$?
exit $result

View File

@ -4,7 +4,7 @@
# Test non-ASCII msgids when the PO file and the POT file are in different
# encodings.
cat <<\EOF > mm-test16.po
cat <<\EOF > mm-ch-3.po
msgid ""
msgstr ""
"Project-Id-Version: hello-cplusplus-qt 0\n"
@ -28,7 +28,7 @@ msgid "error %1."
msgstr "b³±d %1."
EOF
cat <<\EOF > mm-test16.pot
cat <<\EOF > mm-ch-3.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Yoyodyne, Inc.
# This file is distributed under the same license as the PACKAGE package.
@ -57,10 +57,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test16.tmp.po mm-test16.po mm-test16.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test16.tmp.po > mm-test16.new.po || Exit 1
${MSGMERGE} -q -o mm-ch-3.tmp.po mm-ch-3.po mm-ch-3.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-ch-3.tmp.po > mm-ch-3.new.po || Exit 1
cat <<\EOF > mm-test16.ok
cat <<\EOF > mm-ch-3.ok
msgid ""
msgstr ""
"Project-Id-Version: hello-cplusplus-qt 0\n"
@ -86,7 +86,7 @@ msgstr "błąd %1."
EOF
: ${DIFF=diff}
${DIFF} mm-test16.ok mm-test16.new.po
${DIFF} mm-ch-3.ok mm-ch-3.new.po
result=$?
exit $result

View File

@ -3,7 +3,7 @@
# Test multi-domain handling.
cat <<\EOF > mm-test7.po
cat <<\EOF > mm-d-1.po
domain "foo-de"
msgid ""
msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
@ -29,7 +29,7 @@ msgid "bye"
msgstr "A bientôt"
EOF
cat <<\EOF > mm-test7.pot
cat <<\EOF > mm-d-1.pot
domain "foo-de"
msgid "Hello"
msgstr ""
@ -39,10 +39,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test7.tmp mm-test7.po mm-test7.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test7.tmp > mm-test7.out || Exit 1
${MSGMERGE} -q -o mm-d-1.tmp mm-d-1.po mm-d-1.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-d-1.tmp > mm-d-1.out || Exit 1
cat <<\EOF > mm-test7.ok
cat <<\EOF > mm-d-1.ok
domain "foo-de"
msgid ""
@ -73,7 +73,7 @@ msgstr "Salut"
EOF
: ${DIFF=diff}
${DIFF} mm-test7.ok mm-test7.out
${DIFF} mm-d-1.ok mm-d-1.out
result=$?
exit $result

View File

@ -3,7 +3,7 @@
# Test multi-domain handling.
cat <<\EOF > mm-test8.po
cat <<\EOF > mm-d-2.po
domain "foo-de"
msgid ""
msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
@ -29,16 +29,16 @@ msgid "bye"
msgstr "A bientôt"
EOF
cat <<\EOF > mm-test8.pot
cat <<\EOF > mm-d-2.pot
msgid "Hello"
msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} --multi-domain -q -o mm-test8.tmp mm-test8.po mm-test8.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test8.tmp > mm-test8.out || Exit 1
${MSGMERGE} --multi-domain -q -o mm-d-2.tmp mm-d-2.po mm-d-2.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-d-2.tmp > mm-d-2.out || Exit 1
cat <<\EOF > mm-test8.ok
cat <<\EOF > mm-d-2.ok
domain "foo-de"
msgid ""
@ -69,7 +69,7 @@ msgstr "Salut"
EOF
: ${DIFF=diff}
${DIFF} mm-test8.ok mm-test8.out
${DIFF} mm-d-2.ok mm-d-2.out
result=$?
exit $result

View File

@ -4,7 +4,7 @@
# Test merging of a message which has c-format specified in ref.pot but not
# in def.po.
cat <<\EOF > mm-test13.po
cat <<\EOF > mm-f-1.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -43,7 +43,7 @@ msgid "%age"
msgstr "%-Satz"
EOF
cat <<\EOF > mm-test13.pot
cat <<\EOF > mm-f-1.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -84,10 +84,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test13.tmp mm-test13.po mm-test13.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test13.tmp > mm-test13.out || Exit 1
${MSGMERGE} -q -o mm-f-1.tmp mm-f-1.po mm-f-1.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-f-1.tmp > mm-f-1.out || Exit 1
cat <<\EOF > mm-test13.ok
cat <<\EOF > mm-f-1.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -129,7 +129,7 @@ msgstr "%-Satz"
EOF
: ${DIFF=diff}
${DIFF} mm-test13.ok mm-test13.out
${DIFF} mm-f-1.ok mm-f-1.out
result=$?
exit $result

View File

@ -4,7 +4,7 @@
# Test msgmerge when a message's flags have been changed from c-format to
# kde-format. Reported by Chusslove Illich (Часлав Илић).
cat <<\EOF > mm-test21.po
cat <<\EOF > mm-f-2.po
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext-tools 0.16\n"
@ -25,7 +25,7 @@ msgstr[0] "Engadir un recurso dende o libro de enderezos"
msgstr[1] "Engadir %n recursos dende o libro de enderezos"
EOF
cat <<\EOF > mm-test21.pot
cat <<\EOF > mm-f-2.pot
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext-tools 0.16\n"
@ -46,10 +46,10 @@ msgstr[1] ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test21.tmp.po mm-test21.po mm-test21.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test21.tmp.po > mm-test21.new.po || Exit 1
${MSGMERGE} -q -o mm-f-2.tmp.po mm-f-2.po mm-f-2.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-f-2.tmp.po > mm-f-2.new.po || Exit 1
cat <<\EOF > mm-test21.ok
cat <<\EOF > mm-f-2.ok
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext-tools 0.16\n"
@ -72,9 +72,9 @@ msgstr[1] "Engadir %n recursos dende o libro de enderezos"
EOF
: ${DIFF=diff}
${DIFF} mm-test21.ok mm-test21.new.po || Exit 1
${DIFF} mm-f-2.ok mm-f-2.new.po || Exit 1
: ${MSGFMT=msgfmt}
${MSGFMT} --check -o mm-test21.mo mm-test21.new.po || Exit 1
${MSGFMT} --check -o mm-f-2.mo mm-f-2.new.po || Exit 1
Exit 0

View File

@ -4,7 +4,7 @@
# Test that the msgmerge output is stable under an 'msgcat' invocation.
# Also test what happens with the 'c-format' flag during msgmerge.
cat <<\EOF > mm-test28.po
cat <<\EOF > mm-f-3.po
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,7 +25,7 @@ msgid "warning: missing context for plural argument of keyword '%.*s'"
msgstr "Warnung: fehlender Kontext für das Plural-Argument des Schlüsselwortes »%.*s«"
EOF
cat <<\EOF > mm-test28-1.pot
cat <<\EOF > mm-f-3-1.pot
#, fuzzy
msgid ""
msgstr ""
@ -47,17 +47,17 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test28.tmp.po mm-test28.po mm-test28-1.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28.new.po || Exit 1
${MSGMERGE} -q -o mm-f-3.tmp.po mm-f-3.po mm-f-3-1.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-f-3.tmp.po > mm-f-3.new.po || Exit 1
: ${MSGCAT=msgcat}
${MSGCAT} mm-test28.new.po > mm-test28.tmp.po || Exit 1
LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28.cat.po || Exit 1
${MSGCAT} mm-f-3.new.po > mm-f-3.tmp.po || Exit 1
LC_ALL=C tr -d '\r' < mm-f-3.tmp.po > mm-f-3.cat.po || Exit 1
: ${DIFF=diff}
${DIFF} mm-test28.new.po mm-test28.cat.po || Exit 1
${DIFF} mm-f-3.new.po mm-f-3.cat.po || Exit 1
cat <<\EOF > mm-test28-1.ok
cat <<\EOF > mm-f-3-1.ok
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
@ -88,12 +88,12 @@ msgstr ""
EOF
: ${DIFF=diff}
${DIFF} mm-test28-1.ok mm-test28.new.po || Exit 1
${DIFF} mm-f-3-1.ok mm-f-3.new.po || Exit 1
# Now test what happens with the 'c-format' flag when merging with a POT file
# where the 'c-format' flag is set.
cat <<\EOF > mm-test28-2.pot
cat <<\EOF > mm-f-3-2.pot
#, fuzzy
msgid ""
msgstr ""
@ -124,10 +124,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test28.tmp.po mm-test28.new.po mm-test28-2.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28-2.po || Exit 1
${MSGMERGE} -q -o mm-f-3.tmp.po mm-f-3.new.po mm-f-3-2.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-f-3.tmp.po > mm-f-3-2.po || Exit 1
cat <<\EOF > mm-test28-2.ok
cat <<\EOF > mm-f-3-2.ok
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
@ -158,12 +158,12 @@ msgstr ""
EOF
: ${DIFF=diff}
${DIFF} mm-test28-2.ok mm-test28-2.po || Exit 1
${DIFF} mm-f-3-2.ok mm-f-3-2.po || Exit 1
# Now test what happens with the 'c-format' flag when merging with a POT file
# where the 'c-format' flag is absent.
cat <<\EOF > mm-test28-3.pot
cat <<\EOF > mm-f-3-3.pot
#, fuzzy
msgid ""
msgstr ""
@ -190,10 +190,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test28.tmp.po mm-test28.new.po mm-test28-3.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28-3.po || Exit 1
${MSGMERGE} -q -o mm-f-3.tmp.po mm-f-3.new.po mm-f-3-3.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-f-3.tmp.po > mm-f-3-3.po || Exit 1
cat <<\EOF > mm-test28-3.ok
cat <<\EOF > mm-f-3-3.ok
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
@ -220,6 +220,6 @@ msgstr ""
EOF
: ${DIFF=diff}
${DIFF} mm-test28-3.ok mm-test28-3.po || Exit 1
${DIFF} mm-f-3-3.ok mm-f-3-3.po || Exit 1
Exit 0

View File

@ -4,7 +4,7 @@
# Test merging of a message which has plural forms in ref.pot but not
# in def.po.
cat <<\EOF > mm-test10.po
cat <<\EOF > mm-pl-1.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -26,7 +26,7 @@ msgid "%d error"
msgstr "%d erreur"
EOF
cat <<\EOF > mm-test10.pot
cat <<\EOF > mm-pl-1.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -51,10 +51,10 @@ msgstr[1] ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test10.tmp mm-test10.po mm-test10.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test10.tmp > mm-test10.out || Exit 1
${MSGMERGE} -q -o mm-pl-1.tmp mm-pl-1.po mm-pl-1.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-pl-1.tmp > mm-pl-1.out || Exit 1
cat <<\EOF > mm-test10.ok
cat <<\EOF > mm-pl-1.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -80,7 +80,7 @@ msgstr[1] "%d erreur"
EOF
: ${DIFF=diff}
${DIFF} mm-test10.ok mm-test10.out
${DIFF} mm-pl-1.ok mm-pl-1.out
result=$?
exit $result

View File

@ -4,7 +4,7 @@
# Test merging of a message which has plural forms in ref.pot but not
# in def.po.
cat <<\EOF > mm-test11.po
cat <<\EOF > mm-pl-2.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -28,7 +28,7 @@ msgid "%d error"
msgstr "%d erreur"
EOF
cat <<\EOF > mm-test11.pot
cat <<\EOF > mm-pl-2.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -53,10 +53,10 @@ msgstr[1] ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test11.tmp mm-test11.po mm-test11.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test11.tmp > mm-test11.out || Exit 1
${MSGMERGE} -q -o mm-pl-2.tmp mm-pl-2.po mm-pl-2.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-pl-2.tmp > mm-pl-2.out || Exit 1
cat <<\EOF > mm-test11.ok
cat <<\EOF > mm-pl-2.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -86,7 +86,7 @@ msgstr[3] "%d erreur"
EOF
: ${DIFF=diff}
${DIFF} mm-test11.ok mm-test11.out
${DIFF} mm-pl-2.ok mm-pl-2.out
result=$?
exit $result

View File

@ -4,7 +4,7 @@
# Test merging of a message which has plural forms in def.po but not
# in ref.pot.
cat <<\EOF > mm-test12.po
cat <<\EOF > mm-pl-3.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -28,7 +28,7 @@ msgstr[0] "%d erreur"
msgstr[1] "%d erreurs"
EOF
cat <<\EOF > mm-test12.pot
cat <<\EOF > mm-pl-3.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -51,10 +51,10 @@ msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test12.tmp mm-test12.po mm-test12.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test12.tmp > mm-test12.out || Exit 1
${MSGMERGE} -q -o mm-pl-3.tmp mm-pl-3.po mm-pl-3.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-pl-3.tmp > mm-pl-3.out || Exit 1
cat <<\EOF > mm-test12.ok
cat <<\EOF > mm-pl-3.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@ -78,7 +78,7 @@ msgstr "%d erreur"
EOF
: ${DIFF=diff}
${DIFF} mm-test12.ok mm-test12.out
${DIFF} mm-pl-3.ok mm-pl-3.out
result=$?
exit $result

View File

@ -4,7 +4,7 @@
# Test msgmerge when a msgid_plural changed but msgid remained the same.
# Reported by Chusslove Illich (Часлав Илић).
cat <<\EOF > mm-test22.po
cat <<\EOF > mm-pl-4.po
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext-tools 0.16\n"
@ -24,7 +24,7 @@ msgstr[0] "Engadir un recurso dende o libro de enderezos"
msgstr[1] "Engadir %n recursos dende o libro de enderezos"
EOF
cat <<\EOF > mm-test22.pot
cat <<\EOF > mm-pl-4.pot
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext-tools 0.16\n"
@ -44,10 +44,10 @@ msgstr[1] ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test22.tmp.po mm-test22.po mm-test22.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test22.tmp.po > mm-test22.new.po || Exit 1
${MSGMERGE} -q -o mm-pl-4.tmp.po mm-pl-4.po mm-pl-4.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-pl-4.tmp.po > mm-pl-4.new.po || Exit 1
cat <<\EOF > mm-test22.ok
cat <<\EOF > mm-pl-4.ok
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext-tools 0.16\n"
@ -70,9 +70,9 @@ msgstr[1] "Engadir %n recursos dende o libro de enderezos"
EOF
: ${DIFF=diff}
${DIFF} mm-test22.ok mm-test22.new.po || Exit 1
${DIFF} mm-pl-4.ok mm-pl-4.new.po || Exit 1
: ${MSGFMT=msgfmt}
${MSGFMT} --check -o mm-test22.mo mm-test22.new.po || Exit 1
${MSGFMT} --check -o mm-pl-4.mo mm-pl-4.new.po || Exit 1
Exit 0

View File

@ -5,7 +5,7 @@
# and --previous was specified.
# Reported by Chusslove Illich (Часлав Илић).
cat <<\EOF > mm-test23.po
cat <<\EOF > mm-pl-5.po
msgid ""
msgstr ""
"Project-Id-Version: \n"
@ -41,7 +41,7 @@ msgstr[0] "Ein Band"
msgstr[1] "%n Bände"
EOF
cat <<\EOF > mm-test23.pot
cat <<\EOF > mm-pl-5.pot
msgid ""
msgstr ""
"Project-Id-Version: \n"
@ -77,10 +77,10 @@ msgstr[1] ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q --previous -o mm-test23.tmp.po mm-test23.po mm-test23.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test23.tmp.po > mm-test23.new.po || Exit 1
${MSGMERGE} -q --previous -o mm-pl-5.tmp.po mm-pl-5.po mm-pl-5.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-pl-5.tmp.po > mm-pl-5.new.po || Exit 1
cat <<\EOF > mm-test23.ok
cat <<\EOF > mm-pl-5.ok
msgid ""
msgstr ""
"Project-Id-Version: \n"
@ -120,9 +120,9 @@ msgstr[1] "%n Bände"
EOF
: ${DIFF=diff}
${DIFF} mm-test23.ok mm-test23.new.po || Exit 1
${DIFF} mm-pl-5.ok mm-pl-5.new.po || Exit 1
: ${MSGFMT=msgfmt}
${MSGFMT} --check -o mm-test23.mo mm-test23.new.po || Exit 1
${MSGFMT} --check -o mm-pl-5.mo mm-pl-5.new.po || Exit 1
Exit 0

View File

@ -3,7 +3,7 @@
# Test msgmerge and msgcmp: handling of 'range:' flags.
cat <<\EOF > mm-test24.po
cat <<\EOF > mm-pl-6.po
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
@ -46,7 +46,7 @@ msgstr[0] "cinq semaines et un jour"
msgstr[1] "cinq semaines et %d jours"
EOF
cat <<\EOF > mm-test24.pot
cat <<\EOF > mm-pl-6.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
@ -102,13 +102,13 @@ msgstr[1] ""
EOF
: ${MSGCMP=msgcmp}
${MSGCMP} --use-fuzzy --use-untranslated mm-test24.po mm-test24.pot 2>/dev/null || Exit 1
${MSGCMP} --use-fuzzy --use-untranslated mm-pl-6.po mm-pl-6.pot 2>/dev/null || Exit 1
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test24.tmp.po mm-test24.po mm-test24.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test24.tmp.po > mm-test24.new.po || Exit 1
${MSGMERGE} -q -o mm-pl-6.tmp.po mm-pl-6.po mm-pl-6.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-pl-6.tmp.po > mm-pl-6.new.po || Exit 1
cat <<\EOF > mm-test24.ok
cat <<\EOF > mm-pl-6.ok
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
@ -153,9 +153,9 @@ msgstr[1] "cinq semaines et %d jours"
EOF
: ${DIFF=diff}
${DIFF} mm-test24.ok mm-test24.new.po || Exit 1
${DIFF} mm-pl-6.ok mm-pl-6.new.po || Exit 1
: ${MSGCMP=msgcmp}
${MSGCMP} --use-fuzzy --use-untranslated mm-test24.new.po mm-test24.pot || Exit 1
${MSGCMP} --use-fuzzy --use-untranslated mm-pl-6.new.po mm-pl-6.pot || Exit 1
Exit 0