1#! /bin/sh
2
3# Test compendium option.  Use it there was no "old" PO file at all
4# (merely use /dev/null).
5
6tmpfiles=""
7trap 'rm -fr $tmpfiles' 1 2 3 15
8
9tmpfiles="$tmpfiles mm-c-4.com mm-c-4.pot"
10
11cat <<\EOF > mm-c-4.com
12msgid ""
13msgstr ""
14"Content-Type: text/plain; charset=iso-8859-1\n"
15"Content-Transfer-Encoding: 8bit\n"
16
17#: file.c:345
18msgid "5"
19msgstr "f�nf"
20EOF
21
22cat <<EOF > mm-c-4.pot
23#: file.c:123
24msgid "1"
25msgstr ""
26
27#: file.c:345
28msgid "5"
29msgstr ""
30EOF
31
32tmpfiles="$tmpfiles mm-c-4.out"
33: ${MSGMERGE=msgmerge}
34${MSGMERGE} -q --compendium mm-c-4.com -o mm-c-4.out /dev/null mm-c-4.pot
35test $? = 0 || { rm -fr $tmpfiles; exit 1; }
36
37tmpfiles="$tmpfiles mm-c-4.ok"
38cat << \EOF > mm-c-4.ok
39msgid ""
40msgstr ""
41"Content-Type: text/plain; charset=iso-8859-1\n"
42"Content-Transfer-Encoding: 8bit\n"
43
44#: file.c:123
45msgid "1"
46msgstr ""
47
48#: file.c:345
49msgid "5"
50msgstr "f�nf"
51EOF
52
53: ${DIFF=diff}
54${DIFF} mm-c-4.ok mm-c-4.out
55result=$?
56
57rm -fr $tmpfiles
58
59exit $result
60