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