Home | History | Annotate | Line # | Download | only in tests
      1  1.1  christos #! /bin/sh
      2  1.1  christos 
      3  1.1  christos # -u, --unique (equivalent to --less-than=2): we are interested in unique
      4  1.1  christos # entries only (entries occuring less than 2 times).  But don't drop the
      5  1.1  christos # header entry; otherwise msgcomm will fail for multibyte strings.
      6  1.1  christos 
      7  1.1  christos tmpfiles=""
      8  1.1  christos trap 'rm -fr $tmpfiles' 1 2 3 15
      9  1.1  christos 
     10  1.1  christos tmpfiles="$tmpfiles mcomm-test17.in1 mcomm-test17.in2 mcomm-test17.in3"
     11  1.1  christos cat <<EOF > mcomm-test17.in1
     12  1.1  christos msgid ""
     13  1.1  christos msgstr ""
     14  1.1  christos "Project-Id-Version: GNU one 1.2.3\n"
     15  1.1  christos "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     16  1.1  christos "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     17  1.1  christos "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     18  1.1  christos "Language-Team: German <de (at] li.org>\n"
     19  1.1  christos "MIME-Version: 1.0\n"
     20  1.1  christos "Content-Type: text/plain; charset=ISO-8859-1\n"
     21  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     22  1.1  christos 
     23  1.1  christos # occurs 3 times
     24  1.1  christos #: first.c:123
     25  1.1  christos msgid "1"
     26  1.1  christos msgstr "1x"
     27  1.1  christos EOF
     28  1.1  christos 
     29  1.1  christos cat <<EOF > mcomm-test17.in2
     30  1.1  christos msgid ""
     31  1.1  christos msgstr ""
     32  1.1  christos "Project-Id-Version: GNU one 1.2.3\n"
     33  1.1  christos "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     34  1.1  christos "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     35  1.1  christos "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     36  1.1  christos "Language-Team: German <de (at] li.org>\n"
     37  1.1  christos "MIME-Version: 1.0\n"
     38  1.1  christos "Content-Type: text/plain; charset=ISO-8859-1\n"
     39  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     40  1.1  christos 
     41  1.1  christos #: hunt.c:759
     42  1.1  christos msgid "1"
     43  1.1  christos msgstr ""
     44  1.1  christos EOF
     45  1.1  christos 
     46  1.1  christos cat <<\EOF > mcomm-test17.in3
     47  1.1  christos msgid ""
     48  1.1  christos msgstr ""
     49  1.1  christos "Project-Id-Version: GNU one 1.2.3\n"
     50  1.1  christos "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     51  1.1  christos "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     52  1.1  christos "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     53  1.1  christos "Language-Team: German <de (at] li.org>\n"
     54  1.1  christos "MIME-Version: 1.0\n"
     55  1.1  christos "Content-Type: text/plain; charset=ISO-8859-1\n"
     56  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     57  1.1  christos 
     58  1.1  christos #: hunt.c:789
     59  1.1  christos msgid "1"
     60  1.1  christos msgstr ""
     61  1.1  christos 
     62  1.1  christos # unique
     63  1.1  christos #: hunt.c:890
     64  1.1  christos msgid "5"
     65  1.1  christos msgstr "fnf"
     66  1.1  christos EOF
     67  1.1  christos 
     68  1.1  christos tmpfiles="$tmpfiles mcomm-test17.out"
     69  1.1  christos : ${MSGCOMM=msgcomm}
     70  1.1  christos 
     71  1.1  christos ${MSGCOMM} -u \
     72  1.1  christos            -o mcomm-test17.out \
     73  1.1  christos            mcomm-test17.in1 mcomm-test17.in2 mcomm-test17.in3
     74  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     75  1.1  christos 
     76  1.1  christos tmpfiles="$tmpfiles mcomm-test17.ok"
     77  1.1  christos cat << \EOF > mcomm-test17.ok
     78  1.1  christos msgid ""
     79  1.1  christos msgstr ""
     80  1.1  christos "Project-Id-Version: GNU one 1.2.3\n"
     81  1.1  christos "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     82  1.1  christos "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     83  1.1  christos "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     84  1.1  christos "Language-Team: German <de (at] li.org>\n"
     85  1.1  christos "MIME-Version: 1.0\n"
     86  1.1  christos "Content-Type: text/plain; charset=ISO-8859-1\n"
     87  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     88  1.1  christos 
     89  1.1  christos # unique
     90  1.1  christos #: hunt.c:890
     91  1.1  christos msgid "5"
     92  1.1  christos msgstr "fnf"
     93  1.1  christos EOF
     94  1.1  christos 
     95  1.1  christos : ${DIFF=diff}
     96  1.1  christos ${DIFF} mcomm-test17.ok mcomm-test17.out
     97  1.1  christos result=$?
     98  1.1  christos 
     99  1.1  christos rm -fr $tmpfiles
    100  1.1  christos 
    101  1.1  christos exit $result
    102