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