• 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# Check for duplicates with identical translations
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mf-test7.in1"
9cat <<EOF > mf-test7.in1
10# SOME DESCRIPTIVE TITLE.
11# Copyright (C) YEAR Free Software Foundation, Inc.
12# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
13#
14msgid ""
15msgstr ""
16"Project-Id-Version: msgfmt test 7\n"
17"PO-Revision-Date: 1996-04-05 19:47+0200\n"
18"Last-Translator: ABC DEF <abc@gnu.uucp>\n"
19"Language-Team: test <test@li.org>\n"
20"MIME-Version: 1.0\n"
21"Content-Type: text/plain; charset=ISO-8859-1\n"
22"Content-Transfer-Encoding: 8bit\n"
23#
24msgid "2" msgstr "2"
25msgid "3" msgstr "3"
26msgid "3" msgstr "3"
27EOF
28
29tmpfiles="$tmpfiles mf-test7.err"
30: ${MSGFMT=msgfmt}
31LC_MESSAGES=C LC_ALL= \
32${MSGFMT} --verbose --check mf-test7.in1 -o /dev/null \
33    2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgfmt\.exe|msgfmt|' | tr -d '\r' > mf-test7.err
34
35tmpfiles="$tmpfiles mf-test7.ok"
36cat << EOF > mf-test7.ok
37mf-test7.in1:17: duplicate message definition...
38mf-test7.in1:16: ...this is the location of the first definition
39msgfmt: found 1 fatal error
40EOF
41
42: ${DIFF=diff}
43${DIFF} mf-test7.ok mf-test7.err
44result=$?
45
46rm -fr $tmpfiles
47
48exit $result
49