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