Home | History | Annotate | Line # | Download | only in tests
      1 #! /bin/sh
      2 
      3 # Test --update: location changed, and xgettext comment added. Both changes
      4 # must be reflected in the resulting PO file.
      5 
      6 tmpfiles=""
      7 trap 'rm -fr $tmpfiles' 1 2 3 15
      8 
      9 tmpfiles="$tmpfiles mm-u-2.po"
     10 cat <<\EOF > mm-u-2.po
     11 # SOME DESCRIPTIVE TITLE.
     12 # Copyright (C) YEAR Free Software Foundation, Inc.
     13 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     14 #
     15 msgid ""
     16 msgstr ""
     17 "Project-Id-Version: cog_training 1.0\n"
     18 "POT-Creation-Date: 2001-04-29 22:40+0200\n"
     19 "PO-Revision-Date: 2001-04-29 21:19+02:00\n"
     20 "Last-Translator: Felix N. <xyz (at] zyx.uucp>\n"
     21 "Language-Team: German <de (at] li.org>\n"
     22 "MIME-Version: 1.0\n"
     23 "Content-Type: text/plain; charset=ISO-8859-1\n"
     24 "Content-Transfer-Encoding: 8bit\n"
     25 
     26 #: cogarithmetic.cc:12
     27 msgid "white"
     28 msgstr "wei"
     29 EOF
     30 
     31 tmpfiles="$tmpfiles mm-u-2.pot"
     32 cat <<EOF > mm-u-2.pot
     33 # SOME DESCRIPTIVE TITLE.
     34 # Copyright (C) YEAR Free Software Foundation, Inc.
     35 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     36 #
     37 msgid ""
     38 msgstr ""
     39 "Project-Id-Version: PACKAGE VERSION\n"
     40 "POT-Creation-Date: 2001-04-29 22:40+0200\n"
     41 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
     42 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     43 "Language-Team: LANGUAGE <LL (at] li.org>\n"
     44 "MIME-Version: 1.0\n"
     45 "Content-Type: text/plain; charset=ISO-8859-1\n"
     46 "Content-Transfer-Encoding: 8bit\n"
     47 
     48 #. location changed
     49 #: cogarithmetic.cc:33
     50 msgid "white"
     51 msgstr ""
     52 EOF
     53 
     54 tmpfiles="$tmpfiles mm-u-2.po~"
     55 : ${MSGMERGE=msgmerge}
     56 ${MSGMERGE} -q --update mm-u-2.po mm-u-2.pot
     57 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     58 
     59 tmpfiles="$tmpfiles mm-u-2.ok"
     60 cat <<\EOF > mm-u-2.ok
     61 # SOME DESCRIPTIVE TITLE.
     62 # Copyright (C) YEAR Free Software Foundation, Inc.
     63 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     64 #
     65 msgid ""
     66 msgstr ""
     67 "Project-Id-Version: cog_training 1.0\n"
     68 "POT-Creation-Date: 2001-04-29 22:40+0200\n"
     69 "PO-Revision-Date: 2001-04-29 21:19+02:00\n"
     70 "Last-Translator: Felix N. <xyz (at] zyx.uucp>\n"
     71 "Language-Team: German <de (at] li.org>\n"
     72 "MIME-Version: 1.0\n"
     73 "Content-Type: text/plain; charset=ISO-8859-1\n"
     74 "Content-Transfer-Encoding: 8bit\n"
     75 
     76 #. location changed
     77 #: cogarithmetic.cc:33
     78 msgid "white"
     79 msgstr "wei"
     80 EOF
     81 
     82 : ${DIFF=diff}
     83 ${DIFF} mm-u-2.ok mm-u-2.po
     84 result=$?
     85 
     86 rm -fr $tmpfiles
     87 
     88 exit $result
     89