Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-12
1 #! /bin/sh
2
3 # Verify that msgcat complains when it would need to change msgids.
4
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
7
8 tmpfiles="$tmpfiles mcat-test12.in1 mcat-test12.in2"
9 cat <<\EOF > mcat-test12.in1
10 msgid ""
11 msgstr ""
12 "Content-Type: text/plain; charset=UTF-8\n"
13 "Content-Transfer-Encoding: 8bit\n"
14
15 #. Denote a lock's state
16 msgid "Open"
17 msgstr "Ouverte"
18
19 #. Denote a lock's state
20 msgid "Closed"
21 msgstr "Fermée"
22 EOF
23
24 cat <<\EOF > mcat-test12.in2
25 msgid ""
26 msgstr ""
27 "Content-Type: text/plain; charset=ISO-8859-1\n"
28 "Content-Transfer-Encoding: 8bit\n"
29
30 #. Denote a lock's state
31 msgid "Open"
32 msgstr "Ouvert"
33
34 #. Denote a lock's state
35 msgid "Closed"
36 msgstr "Fermé"
37
38 #. A product
39 msgid "Audi car"
40 msgstr "voiture Audi"
41
42 #. A product
43 msgid "Océ copier"
44 msgstr "photocopieur Océ"
45 EOF
46
47 tmpfiles="$tmpfiles mcat-test12.out"
48 rm -f mcat-test12.out
49 : ${MSGCAT=msgcat}
50 ${MSGCAT} -o mcat-test12.out mcat-test12.in1 mcat-test12.in2 2>/dev/null
51 test $? = 1 || { rm -fr $tmpfiles; exit 1; }
52
53 rm -fr $tmpfiles
54
55 exit 0