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