No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgmerge-2
blob9580df5fffc711cd0903884a4dc8cb19d0dc9e04
1 #! /bin/sh
3 # Test recognition of duplicates.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mm-test2.in1 mm-test2.in2"
9 cat <<EOF > mm-test2.in1
10 msgid "2" msgstr "2"
11 msgid "3" msgstr "3"
12 msgid "2" msgstr "ha ha"
13 EOF
15 cat <<EOF > mm-test2.in2
16 msgid "1" msgstr ""
17 msgid "2" msgstr ""
18 msgid "3" msgstr ""
19 EOF
21 tmpfiles="$tmpfiles mm-test2.out"
22 : ${MSGMERGE=msgmerge}
23 LC_MESSAGES=C LC_ALL= \
24 ${MSGMERGE} -q mm-test2.in1 mm-test2.in2 -o /dev/stdout \
25 2>&1 | grep -v '^==' > mm-test2.out
27 tmpfiles="$tmpfiles mm-test2.ok"
28 cat << EOF > mm-test2.ok
29 mm-test2.in1:3: duplicate message definition
30 mm-test2.in1:1: ...this is the location of the first definition
31 msgmerge: found 1 fatal error
32 EOF
34 : ${DIFF=diff}
35 ${DIFF} mm-test2.ok mm-test2.out
36 result=$?
38 rm -fr $tmpfiles
40 exit $result