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