Home | History | Annotate | Line # | Download | only in tests
      1  1.1  christos #! /bin/sh
      2  1.1  christos 
      3  1.1  christos # Test msguniq on PO file with previous msgids.
      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 msguniq-6.in"
      9  1.1  christos cat <<\EOF > msguniq-6.in
     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 #. TRANSLATORS: An error message.
     22  1.1  christos #: src/args.c:247
     23  1.1  christos #, fuzzy, c-format
     24  1.1  christos #| msgid "too many arguments"
     25  1.1  christos msgid "too few arguments"
     26  1.1  christos msgstr "zu viele Argumente"
     27  1.1  christos 
     28  1.1  christos # Oder besser "fehlende Argumente"?
     29  1.1  christos #. TRANSLATORS: An error message.
     30  1.1  christos #: src/args.c:273
     31  1.1  christos #, c-format
     32  1.1  christos msgid "missing arguments"
     33  1.1  christos msgstr "Argumente fehlen"
     34  1.1  christos 
     35  1.1  christos #: getopt.c:796 getopt.c:799
     36  1.1  christos #, fuzzy, c-format
     37  1.1  christos #| msgid "%s: invalid option -- %c\n"
     38  1.1  christos msgid "%s: illegal option -- %c\n"
     39  1.1  christos msgstr "%s: ungltige Option -- %c\n"
     40  1.1  christos 
     41  1.1  christos #: getopt.c:805 getopt.c:808
     42  1.1  christos #, c-format
     43  1.1  christos msgid "%s: invalid option -- %c\n"
     44  1.1  christos msgstr "%s: ungltige Option -- %c\n"
     45  1.1  christos 
     46  1.1  christos #. TRANSLATORS: An error message.
     47  1.1  christos #: src/args.c:247
     48  1.1  christos #, c-format
     49  1.1  christos msgid "too few arguments"
     50  1.1  christos msgstr "zu wenige Argumente"
     51  1.1  christos 
     52  1.1  christos #. TRANSLATORS: An error message.
     53  1.1  christos #: src/args.c:242
     54  1.1  christos #, fuzzy, c-format
     55  1.1  christos #| msgid "too few arguments"
     56  1.1  christos msgid "too many arguments"
     57  1.1  christos msgstr "zu wenige Argumente"
     58  1.1  christos 
     59  1.1  christos #: getopt.c:796 getopt.c:799
     60  1.1  christos #, fuzzy, c-format
     61  1.1  christos #| msgid "%s: invalid options -- %c\n"
     62  1.1  christos msgid "%s: illegal option -- %c\n"
     63  1.1  christos msgstr "%s: ungltige Optionen -- %c\n"
     64  1.1  christos 
     65  1.1  christos #: getopt.c:863 getopt.c:882 getopt.c:1095 getopt.c:1116
     66  1.1  christos #, fuzzy, c-format
     67  1.1  christos #| msgid "%s: option requires an argument -- %c\n"
     68  1.1  christos msgid "%s: option requires more than one argument\n"
     69  1.1  christos msgstr "%s: Option erwartet ein Argument -- %c\n"
     70  1.1  christos EOF
     71  1.1  christos 
     72  1.1  christos tmpfiles="$tmpfiles msguniq-6.out"
     73  1.1  christos : ${MSGUNIQ=msguniq}
     74  1.1  christos ${MSGUNIQ} -o msguniq-6.out msguniq-6.in
     75  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     76  1.1  christos 
     77  1.1  christos tmpfiles="$tmpfiles msguniq-6.ok"
     78  1.1  christos cat <<\EOF > msguniq-6.ok
     79  1.1  christos msgid ""
     80  1.1  christos msgstr ""
     81  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
     82  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     83  1.1  christos 
     84  1.1  christos #. TRANSLATORS: An error message.
     85  1.1  christos #: src/args.c:242
     86  1.1  christos #, c-format
     87  1.1  christos msgid "too many arguments"
     88  1.1  christos msgstr "zu viele Argumente"
     89  1.1  christos 
     90  1.1  christos #. TRANSLATORS: An error message.
     91  1.1  christos #: src/args.c:247
     92  1.1  christos #, c-format
     93  1.1  christos msgid "too few arguments"
     94  1.1  christos msgstr "zu wenige Argumente"
     95  1.1  christos 
     96  1.1  christos # Oder besser "fehlende Argumente"?
     97  1.1  christos #. TRANSLATORS: An error message.
     98  1.1  christos #: src/args.c:273
     99  1.1  christos #, c-format
    100  1.1  christos msgid "missing arguments"
    101  1.1  christos msgstr "Argumente fehlen"
    102  1.1  christos 
    103  1.1  christos #: getopt.c:796 getopt.c:799
    104  1.1  christos #, fuzzy, c-format
    105  1.1  christos msgid "%s: illegal option -- %c\n"
    106  1.1  christos msgstr ""
    107  1.1  christos "#-#-#-#-#  msguniq-6.in  #-#-#-#-#\n"
    108  1.1  christos "%s: ungltige Option -- %c\n"
    109  1.1  christos "#-#-#-#-#  msguniq-6.in  #-#-#-#-#\n"
    110  1.1  christos "%s: ungltige Optionen -- %c\n"
    111  1.1  christos 
    112  1.1  christos #: getopt.c:805 getopt.c:808
    113  1.1  christos #, c-format
    114  1.1  christos msgid "%s: invalid option -- %c\n"
    115  1.1  christos msgstr "%s: ungltige Option -- %c\n"
    116  1.1  christos 
    117  1.1  christos #: getopt.c:863 getopt.c:882 getopt.c:1095 getopt.c:1116
    118  1.1  christos #, fuzzy, c-format
    119  1.1  christos #| msgid "%s: option requires an argument -- %c\n"
    120  1.1  christos msgid "%s: option requires more than one argument\n"
    121  1.1  christos msgstr "%s: Option erwartet ein Argument -- %c\n"
    122  1.1  christos EOF
    123  1.1  christos 
    124  1.1  christos : ${DIFF=diff}
    125  1.1  christos ${DIFF} msguniq-6.ok msguniq-6.out
    126  1.1  christos result=$?
    127  1.1  christos 
    128  1.1  christos rm -fr $tmpfiles
    129  1.1  christos 
    130  1.1  christos exit $result
    131