xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/tests/msgmerge-8 (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
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.out"
42: ${MSGMERGE=msgmerge}
43${MSGMERGE} --multi-domain -q -o mm-test8.out mm-test8.po mm-test8.pot
44test $? = 0 || { rm -fr $tmpfiles; exit 1; }
45
46tmpfiles="$tmpfiles mm-test8.ok"
47cat <<\EOF > mm-test8.ok
48domain "foo-de"
49
50msgid ""
51msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
52
53# Das ist ein Kommentar.
54#, fuzzy
55msgid "Hello"
56msgstr "Hallo"
57
58# Noch einer.
59#~ msgid "bye"
60#~ msgstr "Tsch��"
61
62domain "foo-fr"
63
64msgid ""
65msgstr "Content-Type: text/plain; charset=ISO-8859-1\n"
66
67# Ceci est un commentaire.
68#, fuzzy
69msgid "Hello"
70msgstr "Salut"
71
72# Encore un.
73#~ msgid "bye"
74#~ msgstr "A bient�t"
75EOF
76
77: ${DIFF=diff}
78${DIFF} mm-test8.ok mm-test8.out
79result=$?
80
81rm -fr $tmpfiles
82
83exit $result
84