Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-tools / tests / msgconv-6
1 #! /bin/sh
2
3 # Test msgconv on a PO file with previous msgids.
4
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
7
8 tmpfiles="$tmpfiles mco-test6.po"
9 cat <<\EOF > mco-test6.po
10 msgid ""
11 msgstr ""
12 "Report-Msgid-Bugs-To: \n"
13 "Content-Type: text/plain; charset=UTF-8\n"
14 "Content-Transfer-Encoding: 8bit\n"
15
16 #, fuzzy
17 #| msgid "© Frobby Inc."
18 msgid "(C) Frobby Inc."
19 msgstr "(C) Dingsbums GmbH"
20
21 #, fuzzy
22 #| msgid "full 360°"
23 msgid "full turn"
24 msgstr "Volle 360 Grad"
25 EOF
26
27 tmpfiles="$tmpfiles mco-test6.tmp mco-test6.out"
28 : ${MSGCONV=msgconv}
29 ${MSGCONV} --to-code=ISO-8859-1 -o mco-test6.tmp mco-test6.po
30 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
31 LC_ALL=C tr -d '\r' < mco-test6.tmp > mco-test6.out
32 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
33
34 tmpfiles="$tmpfiles mco-test6.ok"
35 cat <<\EOF > mco-test6.ok
36 msgid ""
37 msgstr ""
38 "Report-Msgid-Bugs-To: \n"
39 "Content-Type: text/plain; charset=ISO-8859-1\n"
40 "Content-Transfer-Encoding: 8bit\n"
41
42 #, fuzzy
43 #| msgid "© Frobby Inc."
44 msgid "(C) Frobby Inc."
45 msgstr "(C) Dingsbums GmbH"
46
47 #, fuzzy
48 #| msgid "full 360°"
49 msgid "full turn"
50 msgstr "Volle 360 Grad"
51 EOF
52
53 : ${DIFF=diff}
54 ${DIFF} mco-test6.ok mco-test6.out
55 result=$?
56
57 rm -fr $tmpfiles
58
59 exit $result