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