summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/msgfmt-13
blob: d9cb0179bf660d7c2d561fe25c75c1a9b1e256ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test that an out-of-range Unicode character doesn't lead to a crash.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="$tmpfiles mf-test13.po"
cat <<\EOF >mf-test13.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minicom 2.1\n"
"POT-Creation-Date: 2003-05-16 22:33+0200\n"
"PO-Revision-Date: 2003-09-11 14:10+0200\n"
"Last-Translator: Jochen Hein <jochen@jochen.org>\n"
"Language-Team: german <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: src/file.c:60
msgid " [Goto]  [Prev]  [Show]  [Tag]  [Untag]  [Okay] "
msgstr " [Gehe zu]  [Zurück]  [Anzeigen]  [Markieren]  [Markierung lö³£¨en]  [Okay] "

EOF

tmpfiles="$tmpfiles mf-test13.mo"
: ${MSGFMT=msgfmt}
${MSGFMT} mf-test13.po -o mf-test13.mo 2>/dev/null
# Exit code must be 1.
# If the invalid sequence didn't get noticed, it would be 0.
# If it produced a core dump, it would be 134 (= 128 + SIGABRT).
test $? = 1
result=$?

rm -fr $tmpfiles

exit $result