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