0d8f1ffed7326da9ba25670672f891b542970e85
[platform/upstream/gettext.git] / gettext-tools / tests / msgfmt-11
1 #! /bin/sh
2
3 # Test handling of invalid multibyte sequences.
4
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
7
8 tmpfiles="$tmpfiles mf-11.po"
9 cat <<\EOF > mf-11.po
10 msgid ""
11 msgstr ""
12 "Project-Id-Version: control-center 1.0.6\n"
13 "POT-Creation-Date: 2002-06-02 17:13-0700\n"
14 "PO-Revision-Date: 2002-05-29 20:11+0200\n"
15 "Last-Translator: Yuriy Syrota <yuri@renome.rovno.ua>\n"
16 "Language-Team: Ukrainian <uk@li.org>\n"
17 "MIME-Version: 1.0\n"
18 "Content-Type: text/plain; charset=utf-8\n"
19 "Content-Transfer-Encoding: 8bit\n"
20
21 msgid "_Enable keyboard accessibility"
22 msgstr "_õצÍËÎÕÔÉ ÓÐÅæÁÌØΦ ÍÏÖÌÉ×ÏÓÔ¦ ËÌÁצÁÔÕÒÉ"
23 EOF
24
25 tmpfiles="$tmpfiles mf-11.mo core *.core"
26 : ${MSGFMT=msgfmt}
27 ${MSGFMT} --check -o mf-11.mo mf-11.po 2>/dev/null
28 # Exit code must be 1.
29 # If the invalid sequence didn't get noticed, it would be 0.
30 # If it produced a core dump, it would be 134 (= 128 + SIGABRT).
31 test $? = 1
32 result=$?
33
34 rm -fr $tmpfiles
35
36 exit $result