Home | History | Annotate | Line # | Download | only in tests
msgfmt-16 revision 1.1
      1  1.1  christos #! /bin/sh
      2  1.1  christos 
      3  1.1  christos # Test msgfmt on a 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 mf-16.po"
      9  1.1  christos cat <<\EOF > mf-16.po
     10  1.1  christos msgid ""
     11  1.1  christos msgstr ""
     12  1.1  christos "Report-Msgid-Bugs-To: \n"
     13  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
     14  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     15  1.1  christos 
     16  1.1  christos #. TRANSLATORS: An error message.
     17  1.1  christos #: src/args.c:242
     18  1.1  christos #, fuzzy, c-format
     19  1.1  christos #| msgid "too many arguments"
     20  1.1  christos msgid "Too many arguments."
     21  1.1  christos msgstr "zu viele Argumente"
     22  1.1  christos 
     23  1.1  christos #. TRANSLATORS: An error message.
     24  1.1  christos #: src/args.c:247
     25  1.1  christos #, fuzzy, c-format
     26  1.1  christos #| msgid "too many arguments"
     27  1.1  christos msgid "Too few arguments."
     28  1.1  christos msgstr "zu viele Argumente"
     29  1.1  christos 
     30  1.1  christos # Oder besser "fehlende Argumente"?
     31  1.1  christos #. TRANSLATORS: An error message.
     32  1.1  christos #: src/args.c:273
     33  1.1  christos #, c-format
     34  1.1  christos #| msgid "missing arguments"
     35  1.1  christos msgid "Missing arguments."
     36  1.1  christos msgstr "Argumente fehlen."
     37  1.1  christos 
     38  1.1  christos #, fuzzy
     39  1.1  christos #~| msgid "%s: invalid option -- %c\n"
     40  1.1  christos #~ msgid "%s: illegal option -- %c\n"
     41  1.1  christos #~ msgstr "%s: ungltige Option -- %c\n"
     42  1.1  christos 
     43  1.1  christos #~ msgid "%s: invalid option -- %c\n"
     44  1.1  christos #~ msgstr "%s: ungltige Option -- %c\n"
     45  1.1  christos EOF
     46  1.1  christos 
     47  1.1  christos tmpfiles="$tmpfiles mf-16.mo"
     48  1.1  christos : ${MSGFMT=msgfmt}
     49  1.1  christos ${MSGFMT} -o mf-16.mo mf-16.po
     50  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     51  1.1  christos 
     52  1.1  christos tmpfiles="$tmpfiles mf-16.out"
     53  1.1  christos : ${MSGUNFMT=msgunfmt}
     54  1.1  christos ${MSGUNFMT} -o mf-16.out mf-16.mo
     55  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     56  1.1  christos 
     57  1.1  christos tmpfiles="$tmpfiles mf-16.ok"
     58  1.1  christos cat <<\EOF > mf-16.ok
     59  1.1  christos msgid ""
     60  1.1  christos msgstr ""
     61  1.1  christos "Report-Msgid-Bugs-To: \n"
     62  1.1  christos "Content-Type: text/plain; charset=UTF-8\n"
     63  1.1  christos "Content-Transfer-Encoding: 8bit\n"
     64  1.1  christos 
     65  1.1  christos msgid "Missing arguments."
     66  1.1  christos msgstr "Argumente fehlen."
     67  1.1  christos EOF
     68  1.1  christos 
     69  1.1  christos : ${DIFF=diff}
     70  1.1  christos ${DIFF} mf-16.ok mf-16.out
     71  1.1  christos result=$?
     72  1.1  christos 
     73  1.1  christos rm -fr $tmpfiles
     74  1.1  christos 
     75  1.1  christos exit $result
     76