• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test handling of invalid multibyte sequences.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mf-11.po"
9cat <<\EOF > mf-11.po
10msgid ""
11msgstr ""
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
21msgid "_Enable keyboard accessibility"
22msgstr "_��������� ���������� ���������� ����������"
23EOF
24
25tmpfiles="$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).
31test $? = 1
32result=$?
33
34rm -fr $tmpfiles
35
36exit $result
37