NetBSD/gnu/dist/gettext/gettext-tools/tests/msgmerge-7

88 lines
1.3 KiB
Plaintext
Raw Normal View History

2005-04-29 19:05:03 +04:00
#! /bin/sh
# Test multi-domain handling.
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles mm-test7.po"
cat <<\EOF > mm-test7.po
domain "foo-de"
msgid ""
msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
# Das ist ein Kommentar.
msgid "hello"
msgstr "Hallo"
# Noch einer.
msgid "bye"
msgstr "Tsch<63><68>"
domain "foo-fr"
msgid ""
msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
# Ceci est un commentaire.
msgid "hello"
msgstr "Salut"
# Encore un.
msgid "bye"
msgstr "A bient<6E>t"
EOF
tmpfiles="$tmpfiles mm-test7.pot"
cat <<EOF > mm-test7.pot
domain "foo-de"
msgid "Hello"
msgstr ""
domain "foo-fr"
msgid "Hello"
msgstr ""
EOF
tmpfiles="$tmpfiles mm-test7.out"
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q mm-test7.po mm-test7.pot -o mm-test7.out
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles mm-test7.ok"
cat <<\EOF > mm-test7.ok
domain "foo-de"
msgid ""
msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
# Das ist ein Kommentar.
#, fuzzy
msgid "Hello"
msgstr "Hallo"
# Noch einer.
#~ msgid "bye"
#~ msgstr "Tsch<63><68>"
domain "foo-fr"
msgid ""
msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
# Ceci est un commentaire.
#, fuzzy
msgid "Hello"
msgstr "Salut"
# Encore un.
#~ msgid "bye"
#~ msgstr "A bient<6E>t"
EOF
: ${DIFF=diff}
${DIFF} mm-test7.ok mm-test7.out
result=$?
rm -fr $tmpfiles
exit $result