Home | History | Annotate | Line # | Download | only in tests
      1 #! /bin/sh
      2 
      3 # Test that an out-of-range Unicode character doesn't lead to a crash.
      4 
      5 tmpfiles=""
      6 trap 'rm -fr $tmpfiles' 1 2 3 15
      7 
      8 tmpfiles="$tmpfiles mf-test13.po"
      9 cat <<\EOF >mf-test13.po
     10 # SOME DESCRIPTIVE TITLE.
     11 # Copyright (C) YEAR Free Software Foundation, Inc.
     12 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     13 #
     14 msgid ""
     15 msgstr ""
     16 "Project-Id-Version: minicom 2.1\n"
     17 "POT-Creation-Date: 2003-05-16 22:33+0200\n"
     18 "PO-Revision-Date: 2003-09-11 14:10+0200\n"
     19 "Last-Translator: Jochen Hein <jochen (at] jochen.org>\n"
     20 "Language-Team: german <de (at] li.org>\n"
     21 "MIME-Version: 1.0\n"
     22 "Content-Type: text/plain; charset=utf-8\n"
     23 "Content-Transfer-Encoding: 8bit\n"
     24 
     25 #: src/file.c:60
     26 msgid " [Goto]  [Prev]  [Show]  [Tag]  [Untag]  [Okay] "
     27 msgstr " [Gehe zu]  [Zurck]  [Anzeigen]  [Markieren]  [Markierung len]  [Okay] "
     28 
     29 EOF
     30 
     31 tmpfiles="$tmpfiles mf-test13.mo"
     32 : ${MSGFMT=msgfmt}
     33 ${MSGFMT} mf-test13.po -o mf-test13.mo 2>/dev/null
     34 # Exit code must be 1.
     35 # If the invalid sequence didn't get noticed, it would be 0.
     36 # If it produced a core dump, it would be 134 (= 128 + SIGABRT).
     37 test $? = 1
     38 result=$?
     39 
     40 rm -fr $tmpfiles
     41 
     42 exit $result
     43