Home | History | Annotate | Line # | Download | only in tests
      1  1.1  christos #! /bin/sh
      2  1.1  christos 
      3  1.1  christos # Test --no-location option when there is a header.
      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 mcomm-test6.in1 mcomm-test6.in2"
      9  1.1  christos cat <<EOF > mcomm-test6.in1
     10  1.1  christos msgid ""
     11  1.1  christos msgstr ""
     12  1.1  christos "Project-Id-Version: GNU one 1.2.3\n"
     13  1.1  christos "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     14  1.1  christos "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     15  1.1  christos "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     16  1.1  christos "Language-Team: German <de (at] li.org>\n"
     17  1.1  christos "MIME-Version: 1.0\n"
     18  1.1  christos "Content-Type: text/plain; charset=iso-8859-1\n"
     19  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     20  1.1  christos 
     21  1.1  christos #: first.c:123
     22  1.1  christos msgid "1"
     23  1.1  christos msgstr "1x"
     24  1.1  christos EOF
     25  1.1  christos 
     26  1.1  christos cat <<EOF > mcomm-test6.in2
     27  1.1  christos #: hunt.c:759
     28  1.1  christos msgid "2"
     29  1.1  christos msgstr "2x"
     30  1.1  christos EOF
     31  1.1  christos 
     32  1.1  christos tmpfiles="$tmpfiles mcomm-test6.out"
     33  1.1  christos : ${MSGCOMM=msgcomm}
     34  1.1  christos ${MSGCOMM} --more-than=0 --no-location -o mcomm-test6.out \
     35  1.1  christos     mcomm-test6.in1 mcomm-test6.in2
     36  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     37  1.1  christos 
     38  1.1  christos tmpfiles="$tmpfiles mcomm-test6.ok"
     39  1.1  christos cat << EOF > mcomm-test6.ok
     40  1.1  christos msgid ""
     41  1.1  christos msgstr ""
     42  1.1  christos "Project-Id-Version: GNU one 1.2.3\n"
     43  1.1  christos "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     44  1.1  christos "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     45  1.1  christos "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     46  1.1  christos "Language-Team: German <de (at] li.org>\n"
     47  1.1  christos "MIME-Version: 1.0\n"
     48  1.1  christos "Content-Type: text/plain; charset=iso-8859-1\n"
     49  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     50  1.1  christos 
     51  1.1  christos msgid "1"
     52  1.1  christos msgstr "1x"
     53  1.1  christos 
     54  1.1  christos msgid "2"
     55  1.1  christos msgstr "2x"
     56  1.1  christos EOF
     57  1.1  christos 
     58  1.1  christos : ${DIFF=diff}
     59  1.1  christos ${DIFF} mcomm-test6.ok mcomm-test6.out
     60  1.1  christos result=$?
     61  1.1  christos 
     62  1.1  christos rm -fr $tmpfiles
     63  1.1  christos 
     64  1.1  christos exit $result
     65