summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/msgmerge-8
blob: 6eda8efeb51fd29005fbc0b5a999c1defb3179e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /bin/sh

# Test multi-domain handling.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="$tmpfiles mm-test8.po"
cat <<\EOF > mm-test8.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 mm-test8.pot"
cat <<EOF > mm-test8.pot
msgid "Hello"
msgstr ""
EOF

tmpfiles="$tmpfiles mm-test8.out"
: ${MSGMERGE=msgmerge}
${MSGMERGE} --multi-domain -q -o mm-test8.out mm-test8.po mm-test8.pot
test $? = 0 || { rm -fr $tmpfiles; exit 1; }

tmpfiles="$tmpfiles mm-test8.ok"
cat <<\EOF > mm-test8.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} mm-test8.ok mm-test8.out
result=$?

rm -fr $tmpfiles

exit $result