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