No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgmerge-9
blob872dc9f1a11033d491525a952de1a6b69e894fe5
1 #! /bin/sh
3 # Duplicates are also fatal in obsolete marked entries (cf. msgmerge-3).
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mm-test9.in1 mm-test9.in2"
9 cat <<EOF > mm-test9.in1
10 msgid "2" msgstr "2"
11 msgid "3" msgstr "3"
12 #~ msgid
13 #~ "2"
14 #~ msgstr
15 #~ "ha ha"
16 EOF
18 cat <<EOF > mm-test9.in2
19 msgid "1" msgstr ""
20 msgid "2" msgstr ""
21 msgid "3" msgstr ""
22 EOF
24 tmpfiles="$tmpfiles mm-test9.err"
25 : ${MSGMERGE=msgmerge}
26 LC_MESSAGES=C LC_ALL= \
27 ${MSGMERGE} -q mm-test9.in1 mm-test9.in2 -o /dev/null \
28 2>&1 | grep -v '^==' > mm-test9.err
30 tmpfiles="$tmpfiles mm-test9.ok"
31 cat << EOF > mm-test9.ok
32 mm-test9.in1:3: duplicate message definition
33 mm-test9.in1:1: ...this is the location of the first definition
34 msgmerge: found 1 fatal error
35 EOF
37 : ${DIFF=diff}
38 ${DIFF} mm-test9.ok mm-test9.err
39 result=$?
41 rm -fr $tmpfiles
43 exit $result