diff options
author | Bruno Haible <bruno@clisp.org> | 2003-02-14 15:43:52 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:09:51 +0200 |
commit | 11337319a90a07459b74f97183c58835f4818c75 (patch) | |
tree | 5d3e6b110178d72d57616e5d0fb191a8b260fd0d /gettext-tools/tests/msgmerge-10 | |
parent | ac55b332252bbc2a2b520a929b89e7033bd68efa (diff) | |
download | external_gettext-11337319a90a07459b74f97183c58835f4818c75.zip external_gettext-11337319a90a07459b74f97183c58835f4818c75.tar.gz external_gettext-11337319a90a07459b74f97183c58835f4818c75.tar.bz2 |
Move tests/msgmerge-10 to gettext-tools/tests/msgmerge-10.
Diffstat (limited to 'gettext-tools/tests/msgmerge-10')
-rwxr-xr-x | gettext-tools/tests/msgmerge-10 | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgmerge-10 b/gettext-tools/tests/msgmerge-10 new file mode 100755 index 0000000..de0aefc --- /dev/null +++ b/gettext-tools/tests/msgmerge-10 @@ -0,0 +1,87 @@ +#! /bin/sh + +# Test multi-domain handling. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles foo.po" +cat <<\EOF > foo.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üß" + +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ôt" +EOF + +tmpfiles="$tmpfiles foo.pot" +cat <<EOF > foo.pot +domain "foo-de" +msgid "Hello" +msgstr "" +domain "foo-fr" +msgid "Hello" +msgstr "" +EOF + +tmpfiles="$tmpfiles foo.out" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q foo.po foo.pot -o foo.out +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles foo.ok" +cat <<\EOF > foo.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üß" + +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ôt" +EOF + +: ${DIFF=diff} +${DIFF} foo.ok foo.out +result=$? + +rm -fr $tmpfiles + +exit $result |