No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgmerge-compendium-3
blobe1e814122a2d78facf9e851f39b7f374803eda70
1 #! /bin/sh
3 # Test compendium option.
5 # Translation is available within the compendium (mm-c-3.com)
6 # the old translation file (mm-c-3.in1) contains the same msgid
7 # Why not make use of the translation from the compendium?
9 tmpfiles=""
10 trap 'rm -fr $tmpfiles' 1 2 3 15
12 tmpfiles="$tmpfiles mm-c-3.in1 mm-c-3.com mm-c-3.pot"
13 cat <<EOF > mm-c-3.in1
14 #: file.c:123
15 msgid "1"
16 msgstr "1x"
18 #: file.c:345
19 msgid "one, two, three"
20 msgstr ""
21 EOF
23 cat <<EOF > mm-c-3.com
24 #: file.c:345
25 msgid "one, two, three"
26 msgstr "1, 2, 3"
27 EOF
29 cat <<EOF > mm-c-3.pot
30 #: file.c:123
31 msgid "1"
32 msgstr ""
34 #: file.c:345
35 msgid "one, two, three"
36 msgstr ""
37 EOF
39 tmpfiles="$tmpfiles mm-c-3.out"
40 : ${MSGMERGE=msgmerge}
41 ${MSGMERGE} -q -C mm-c-3.com mm-c-3.in1 mm-c-3.pot -o mm-c-3.out
42 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
44 tmpfiles="$tmpfiles mm-c-3.ok"
45 cat << EOF > mm-c-3.ok
46 #: file.c:123
47 msgid "1"
48 msgstr "1x"
50 #: file.c:345
51 msgid "one, two, three"
52 msgstr "1, 2, 3"
53 EOF
55 : ${DIFF=diff}
56 ${DIFF} mm-c-3.ok mm-c-3.out
57 result=$?
59 rm -fr $tmpfiles
61 exit $result