Home | History | Annotate | Line # | Download | only in tests
      1 #! /bin/sh
      2 
      3 # Test --omit-header option when there is a header.
      4 
      5 tmpfiles=""
      6 trap 'rm -fr $tmpfiles' 1 2 3 15
      7 
      8 tmpfiles="$tmpfiles mcomm-test5.in1 mcomm-test5.in2"
      9 cat <<EOF > mcomm-test5.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 EOF
     25 
     26 cat <<EOF > mcomm-test5.in2
     27 #: hunt.c:759
     28 msgid "2"
     29 msgstr "2x"
     30 EOF
     31 
     32 tmpfiles="$tmpfiles mcomm-test5.out"
     33 : ${MSGCOMM=msgcomm}
     34 ${MSGCOMM} --more-than=0 --omit-header -o mcomm-test5.out \
     35     mcomm-test5.in1 mcomm-test5.in2
     36 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     37 
     38 tmpfiles="$tmpfiles mcomm-test5.ok"
     39 cat << EOF > mcomm-test5.ok
     40 #: first.c:123
     41 msgid "1"
     42 msgstr "1x"
     43 
     44 #: hunt.c:759
     45 msgid "2"
     46 msgstr "2x"
     47 EOF
     48 
     49 : ${DIFF=diff}
     50 ${DIFF} mcomm-test5.ok mcomm-test5.out
     51 result=$?
     52 
     53 rm -fr $tmpfiles
     54 
     55 exit $result
     56