1#! /bin/sh 2 3# Test multi-domain handling. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles mm-test8.po" 9cat <<\EOF > mm-test8.po 10domain "foo-de" 11msgid "" 12msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" 13 14# Das ist ein Kommentar. 15msgid "hello" 16msgstr "Hallo" 17 18# Noch einer. 19msgid "bye" 20msgstr "Tsch��" 21 22domain "foo-fr" 23msgid "" 24msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" 25 26# Ceci est un commentaire. 27msgid "hello" 28msgstr "Salut" 29 30# Encore un. 31msgid "bye" 32msgstr "A bient�t" 33EOF 34 35tmpfiles="$tmpfiles mm-test8.pot" 36cat <<EOF > mm-test8.pot 37msgid "Hello" 38msgstr "" 39EOF 40 41tmpfiles="$tmpfiles mm-test8.tmp mm-test8.out" 42: ${MSGMERGE=msgmerge} 43${MSGMERGE} --multi-domain -q -o mm-test8.tmp mm-test8.po mm-test8.pot 44test $? = 0 || { rm -fr $tmpfiles; exit 1; } 45tr -d '\r' < mm-test8.tmp > mm-test8.out 46test $? = 0 || { rm -fr $tmpfiles; exit 1; } 47 48tmpfiles="$tmpfiles mm-test8.ok" 49cat <<\EOF > mm-test8.ok 50domain "foo-de" 51 52msgid "" 53msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" 54 55# Das ist ein Kommentar. 56#, fuzzy 57msgid "Hello" 58msgstr "Hallo" 59 60# Noch einer. 61#~ msgid "bye" 62#~ msgstr "Tsch��" 63 64domain "foo-fr" 65 66msgid "" 67msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" 68 69# Ceci est un commentaire. 70#, fuzzy 71msgid "Hello" 72msgstr "Salut" 73 74# Encore un. 75#~ msgid "bye" 76#~ msgstr "A bient�t" 77EOF 78 79: ${DIFF=diff} 80${DIFF} mm-test8.ok mm-test8.out 81result=$? 82 83rm -fr $tmpfiles 84 85exit $result 86