• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Duplicates are also fatal in obsolete marked entries (cf. msgmerge-3).
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mm-test9.in1 mm-test9.in2"
9cat <<EOF > mm-test9.in1
10msgid "2" msgstr "2"
11msgid "3" msgstr "3"
12#~ msgid
13#~ "2"
14#~ msgstr
15#~ "ha ha"
16EOF
17
18cat <<EOF > mm-test9.in2
19msgid "1" msgstr ""
20msgid "2" msgstr ""
21msgid "3" msgstr ""
22EOF
23
24tmpfiles="$tmpfiles mm-test9.err"
25: ${MSGMERGE=msgmerge}
26LC_MESSAGES=C LC_ALL= \
27${MSGMERGE} -q -o /dev/null mm-test9.in1 mm-test9.in2 \
28    2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgmerge\.exe|msgmerge|' | tr -d '\r' > mm-test9.err
29
30tmpfiles="$tmpfiles mm-test9.ok"
31cat << EOF > mm-test9.ok
32mm-test9.in1:3: duplicate message definition...
33mm-test9.in1:1: ...this is the location of the first definition
34msgmerge: found 1 fatal error
35EOF
36
37: ${DIFF=diff}
38${DIFF} mm-test9.ok mm-test9.err
39result=$?
40
41rm -fr $tmpfiles
42
43exit $result
44