Home | History | Annotate | Line # | Download | only in tests
      1 #! /bin/sh
      2 
      3 # Verify that msgcat doesn't introduce alternative syntax if all translations
      4 # have the same msgstr.
      5 
      6 tmpfiles=""
      7 trap 'rm -fr $tmpfiles' 1 2 3 15
      8 
      9 tmpfiles="$tmpfiles mcat-test1.in1 mcat-test1.in2"
     10 cat <<EOF > mcat-test1.in1
     11 msgid ""
     12 msgstr ""
     13 "Project-Id-Version: GNU one 1.2.3\n"
     14 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     15 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     16 "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     17 "Language-Team: German <de (at] li.org>\n"
     18 "MIME-Version: 1.0\n"
     19 "Content-Type: text/plain; charset=iso-8859-1\n"
     20 "Content-Transfer-Encoding: 8bit\n"
     21 
     22 #: first.c:123
     23 msgid "1"
     24 msgstr "eins"
     25 EOF
     26 
     27 cat <<EOF > mcat-test1.in2
     28 msgid ""
     29 msgstr ""
     30 "Project-Id-Version: GNU one 1.2.3\n"
     31 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     32 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     33 "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     34 "Language-Team: German <de (at] li.org>\n"
     35 "MIME-Version: 1.0\n"
     36 "Content-Type: text/plain; charset=iso-8859-1\n"
     37 "Content-Transfer-Encoding: 8bit\n"
     38 
     39 #: hunt.c:759
     40 msgid "1"
     41 msgstr "eins"
     42 EOF
     43 
     44 tmpfiles="$tmpfiles mcat-test1.out"
     45 : ${MSGCAT=msgcat}
     46 ${MSGCAT} -o mcat-test1.out mcat-test1.in1 mcat-test1.in2
     47 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     48 
     49 tmpfiles="$tmpfiles mcat-test1.ok"
     50 cat << EOF > mcat-test1.ok
     51 msgid ""
     52 msgstr ""
     53 "Project-Id-Version: GNU one 1.2.3\n"
     54 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
     55 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
     56 "Last-Translator: Karl Eichwalder <ke (at] suse.de>\n"
     57 "Language-Team: German <de (at] li.org>\n"
     58 "MIME-Version: 1.0\n"
     59 "Content-Type: text/plain; charset=iso-8859-1\n"
     60 "Content-Transfer-Encoding: 8bit\n"
     61 
     62 #: first.c:123 hunt.c:759
     63 msgid "1"
     64 msgstr "eins"
     65 EOF
     66 
     67 : ${DIFF=diff}
     68 ${DIFF} mcat-test1.ok mcat-test1.out
     69 result=$?
     70 
     71 rm -fr $tmpfiles
     72 
     73 exit $result
     74