1#! /bin/sh 2 3# Test multi-domain handling. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles mm-test7.po" 9cat <<\EOF > mm-test7.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-test7.pot" 36cat <<EOF > mm-test7.pot 37domain "foo-de" 38msgid "Hello" 39msgstr "" 40domain "foo-fr" 41msgid "Hello" 42msgstr "" 43EOF 44 45tmpfiles="$tmpfiles mm-test7.out" 46: ${MSGMERGE=msgmerge} 47${MSGMERGE} -q -o mm-test7.out mm-test7.po mm-test7.pot 48test $? = 0 || { rm -fr $tmpfiles; exit 1; } 49 50tmpfiles="$tmpfiles mm-test7.ok" 51cat <<\EOF > mm-test7.ok 52domain "foo-de" 53 54msgid "" 55msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" 56 57# Das ist ein Kommentar. 58#, fuzzy 59msgid "Hello" 60msgstr "Hallo" 61 62# Noch einer. 63#~ msgid "bye" 64#~ msgstr "Tsch��" 65 66domain "foo-fr" 67 68msgid "" 69msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" 70 71# Ceci est un commentaire. 72#, fuzzy 73msgid "Hello" 74msgstr "Salut" 75 76# Encore un. 77#~ msgid "bye" 78#~ msgstr "A bient�t" 79EOF 80 81: ${DIFF=diff} 82${DIFF} mm-test7.ok mm-test7.out 83result=$? 84 85rm -fr $tmpfiles 86 87exit $result 88