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