Home | History | Annotate | Line # | Download | only in tests
      1  1.1  christos #! /bin/sh
      2  1.1  christos 
      3  1.1  christos # Test msgmerge --previous option.
      4  1.1  christos 
      5  1.1  christos tmpfiles=""
      6  1.1  christos trap 'rm -fr $tmpfiles' 1 2 3 15
      7  1.1  christos 
      8  1.1  christos tmpfiles="$tmpfiles mm-test19.po"
      9  1.1  christos cat <<\EOF > mm-test19.po
     10  1.1  christos msgid ""
     11  1.1  christos msgstr ""
     12  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
     13  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     14  1.1  christos 
     15  1.1  christos #. TRANSLATORS: An error message.
     16  1.1  christos #: src/args.c:242
     17  1.1  christos #, c-format
     18  1.1  christos msgid "too many arguments"
     19  1.1  christos msgstr "zu viele Argumente"
     20  1.1  christos 
     21  1.1  christos # Oder besser "fehlende Argumente"?
     22  1.1  christos #. TRANSLATORS: An error message.
     23  1.1  christos #: src/args.c:273
     24  1.1  christos #, c-format
     25  1.1  christos msgid "missing arguments"
     26  1.1  christos msgstr "Argumente fehlen"
     27  1.1  christos 
     28  1.1  christos #: getopt.c:805 getopt.c:808
     29  1.1  christos #, c-format
     30  1.1  christos msgid "%s: invalid option -- %c\n"
     31  1.1  christos msgstr "%s: ungltige Option -- %c\n"
     32  1.1  christos EOF
     33  1.1  christos 
     34  1.1  christos tmpfiles="$tmpfiles mm-test19.pot"
     35  1.1  christos cat <<\EOF > mm-test19.pot
     36  1.1  christos # SOME DESCRIPTIVE TITLE.
     37  1.1  christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
     38  1.1  christos # This file is distributed under the same license as the PACKAGE package.
     39  1.1  christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     40  1.1  christos #
     41  1.1  christos #, fuzzy
     42  1.1  christos msgid ""
     43  1.1  christos msgstr ""
     44  1.1  christos "Project-Id-Version: PACKAGE VERSION\n"
     45  1.1  christos "Report-Msgid-Bugs-To: \n"
     46  1.1  christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
     47  1.1  christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     48  1.1  christos "Language-Team: LANGUAGE <LL (at] li.org>\n"
     49  1.1  christos "MIME-Version: 1.0\n"
     50  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
     51  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     52  1.1  christos 
     53  1.1  christos #. TRANSLATORS: An error message.
     54  1.1  christos #: src/args.c:242
     55  1.1  christos #, c-format
     56  1.1  christos msgid "too many arguments"
     57  1.1  christos msgstr ""
     58  1.1  christos 
     59  1.1  christos #. TRANSLATORS: An error message.
     60  1.1  christos #: src/args.c:247
     61  1.1  christos #, c-format
     62  1.1  christos msgid "too few arguments"
     63  1.1  christos msgstr ""
     64  1.1  christos 
     65  1.1  christos # Oder besser "fehlende Argumente"?
     66  1.1  christos #. TRANSLATORS: An error message.
     67  1.1  christos #: src/args.c:273
     68  1.1  christos #, c-format
     69  1.1  christos msgid "missing arguments"
     70  1.1  christos msgstr ""
     71  1.1  christos 
     72  1.1  christos #: getopt.c:796 getopt.c:799
     73  1.1  christos #, c-format
     74  1.1  christos msgid "%s: illegal option -- %c\n"
     75  1.1  christos msgstr ""
     76  1.1  christos 
     77  1.1  christos #: getopt.c:805 getopt.c:808
     78  1.1  christos #, c-format
     79  1.1  christos msgid "%s: invalid option -- %c\n"
     80  1.1  christos msgstr ""
     81  1.1  christos EOF
     82  1.1  christos 
     83  1.1  christos tmpfiles="$tmpfiles mm-test19.new1.po"
     84  1.1  christos : ${MSGMERGE=msgmerge}
     85  1.1  christos ${MSGMERGE} -q --previous -o mm-test19.new1.po mm-test19.po mm-test19.pot
     86  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     87  1.1  christos 
     88  1.1  christos tmpfiles="$tmpfiles mm-test19.ok1"
     89  1.1  christos cat <<\EOF > mm-test19.ok1
     90  1.1  christos msgid ""
     91  1.1  christos msgstr ""
     92  1.1  christos "Report-Msgid-Bugs-To: \n"
     93  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
     94  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     95  1.1  christos 
     96  1.1  christos #. TRANSLATORS: An error message.
     97  1.1  christos #: src/args.c:242
     98  1.1  christos #, c-format
     99  1.1  christos msgid "too many arguments"
    100  1.1  christos msgstr "zu viele Argumente"
    101  1.1  christos 
    102  1.1  christos #. TRANSLATORS: An error message.
    103  1.1  christos #: src/args.c:247
    104  1.1  christos #, fuzzy, c-format
    105  1.1  christos #| msgid "too many arguments"
    106  1.1  christos msgid "too few arguments"
    107  1.1  christos msgstr "zu viele Argumente"
    108  1.1  christos 
    109  1.1  christos # Oder besser "fehlende Argumente"?
    110  1.1  christos #. TRANSLATORS: An error message.
    111  1.1  christos #: src/args.c:273
    112  1.1  christos #, c-format
    113  1.1  christos msgid "missing arguments"
    114  1.1  christos msgstr "Argumente fehlen"
    115  1.1  christos 
    116  1.1  christos #: getopt.c:796 getopt.c:799
    117  1.1  christos #, fuzzy, c-format
    118  1.1  christos #| msgid "%s: invalid option -- %c\n"
    119  1.1  christos msgid "%s: illegal option -- %c\n"
    120  1.1  christos msgstr "%s: ungltige Option -- %c\n"
    121  1.1  christos 
    122  1.1  christos #: getopt.c:805 getopt.c:808
    123  1.1  christos #, c-format
    124  1.1  christos msgid "%s: invalid option -- %c\n"
    125  1.1  christos msgstr "%s: ungltige Option -- %c\n"
    126  1.1  christos EOF
    127  1.1  christos 
    128  1.1  christos : ${DIFF=diff}
    129  1.1  christos ${DIFF} mm-test19.ok1 mm-test19.new1.po
    130  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
    131  1.1  christos 
    132  1.1  christos tmpfiles="$tmpfiles mm-test19.pot"
    133  1.1  christos cat <<\EOF > mm-test19.pot
    134  1.1  christos # SOME DESCRIPTIVE TITLE.
    135  1.1  christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
    136  1.1  christos # This file is distributed under the same license as the PACKAGE package.
    137  1.1  christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
    138  1.1  christos #
    139  1.1  christos #, fuzzy
    140  1.1  christos msgid ""
    141  1.1  christos msgstr ""
    142  1.1  christos "Project-Id-Version: PACKAGE VERSION\n"
    143  1.1  christos "Report-Msgid-Bugs-To: \n"
    144  1.1  christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    145  1.1  christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    146  1.1  christos "Language-Team: LANGUAGE <LL (at] li.org>\n"
    147  1.1  christos "MIME-Version: 1.0\n"
    148  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
    149  1.1  christos "Content-Transfer-Encoding: 8bit\n"
    150  1.1  christos 
    151  1.1  christos #. TRANSLATORS: An error message.
    152  1.1  christos #: src/args.c:242
    153  1.1  christos #, c-format
    154  1.1  christos msgid "Too many arguments."
    155  1.1  christos msgstr ""
    156  1.1  christos 
    157  1.1  christos #. TRANSLATORS: An error message.
    158  1.1  christos #: src/args.c:247
    159  1.1  christos #, c-format
    160  1.1  christos msgid "Too few arguments."
    161  1.1  christos msgstr ""
    162  1.1  christos 
    163  1.1  christos # Oder besser "fehlende Argumente"?
    164  1.1  christos #. TRANSLATORS: An error message.
    165  1.1  christos #: src/args.c:273
    166  1.1  christos #, c-format
    167  1.1  christos msgid "Missing arguments."
    168  1.1  christos msgstr ""
    169  1.1  christos EOF
    170  1.1  christos 
    171  1.1  christos tmpfiles="$tmpfiles mm-test19.new2.po"
    172  1.1  christos : ${MSGMERGE=msgmerge}
    173  1.1  christos ${MSGMERGE} -q --previous -o mm-test19.new2.po mm-test19.new1.po mm-test19.pot
    174  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
    175  1.1  christos 
    176  1.1  christos tmpfiles="$tmpfiles mm-test19.ok2"
    177  1.1  christos cat <<\EOF > mm-test19.ok2
    178  1.1  christos msgid ""
    179  1.1  christos msgstr ""
    180  1.1  christos "Report-Msgid-Bugs-To: \n"
    181  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
    182  1.1  christos "Content-Transfer-Encoding: 8bit\n"
    183  1.1  christos 
    184  1.1  christos #. TRANSLATORS: An error message.
    185  1.1  christos #: src/args.c:242
    186  1.1  christos #, fuzzy, c-format
    187  1.1  christos #| msgid "too many arguments"
    188  1.1  christos msgid "Too many arguments."
    189  1.1  christos msgstr "zu viele Argumente"
    190  1.1  christos 
    191  1.1  christos #. TRANSLATORS: An error message.
    192  1.1  christos #: src/args.c:247
    193  1.1  christos #, fuzzy, c-format
    194  1.1  christos #| msgid "too many arguments"
    195  1.1  christos msgid "Too few arguments."
    196  1.1  christos msgstr "zu viele Argumente"
    197  1.1  christos 
    198  1.1  christos # Oder besser "fehlende Argumente"?
    199  1.1  christos #. TRANSLATORS: An error message.
    200  1.1  christos #: src/args.c:273
    201  1.1  christos #, fuzzy, c-format
    202  1.1  christos #| msgid "missing arguments"
    203  1.1  christos msgid "Missing arguments."
    204  1.1  christos msgstr "Argumente fehlen"
    205  1.1  christos 
    206  1.1  christos #, fuzzy
    207  1.1  christos #~| msgid "%s: invalid option -- %c\n"
    208  1.1  christos #~ msgid "%s: illegal option -- %c\n"
    209  1.1  christos #~ msgstr "%s: ungltige Option -- %c\n"
    210  1.1  christos 
    211  1.1  christos #~ msgid "%s: invalid option -- %c\n"
    212  1.1  christos #~ msgstr "%s: ungltige Option -- %c\n"
    213  1.1  christos EOF
    214  1.1  christos 
    215  1.1  christos : ${DIFF=diff}
    216  1.1  christos ${DIFF} mm-test19.ok2 mm-test19.new2.po
    217  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
    218  1.1  christos 
    219  1.1  christos rm -fr $tmpfiles
    220  1.1  christos 
    221  1.1  christos exit 0
    222