1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test handling of input files with different translations:
5# try --use-first
6
7cat <<\EOF > mcat-test5.in1
8# German message file for xyz.
9# Copyright (C) 1999, 2000, 2001 xyz.
10# Kab Def <ke@zzz.uucp>, 2000.
11#
12msgid ""
13msgstr ""
14"Project-Id-Version: xyz\n"
15"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
16"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
17"Last-Translator: Kab Def <ke@zzz.uucp>\n"
18"Language-Team: German <i18n@zzz.uucp>\n"
19"MIME-Version: 1.0\n"
20"Content-Type: text/plain; charset=ISO-8859-1\n"
21"Content-Transfer-Encoding: 8bit\n"
22
23#. Help text (HTML-like) START
24#: clients/inst_ask_config.ycp:119
25msgid ""
26"Congratulations!"
27msgstr ""
28"Gl�ckwunsch!"
29EOF
30
31cat <<\EOF > mcat-test5.in2
32# German message file for xyz.
33# Copyright (C) 1999, 2000, 2001 xyz.
34# Kab Def <ke@zzz.uucp>, 2000.
35#
36msgid ""
37msgstr ""
38"Project-Id-Version: xyz\n"
39"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
40"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
41"Last-Translator: Kab Def <ke@zzz.uucp>\n"
42"Language-Team: German <i18n@zzz.uucp>\n"
43"MIME-Version: 1.0\n"
44"Content-Type: text/plain; charset=ISO-8859-1\n"
45"Content-Transfer-Encoding: 8bit\n"
46
47#. Help text (HTML-like) START
48#: clients/inst_ask_config.ycp:119
49msgid ""
50"Congratulations!"
51msgstr ""
52"Herzlichen Gl�ckwunsch!"
53EOF
54
55rm -f mcat-test5.tmp
56
57: ${MSGCAT=msgcat}
58${MSGCAT} --use-first --more-than=0 -o mcat-test5.tmp \
59    mcat-test5.in1 mcat-test5.in2 || Exit 1
60LC_ALL=C tr -d '\r' < mcat-test5.tmp > mcat-test5.out || Exit 1
61
62cat << \EOF > mcat-test5.ok
63# German message file for xyz.
64# Copyright (C) 1999, 2000, 2001 xyz.
65# Kab Def <ke@zzz.uucp>, 2000.
66#
67msgid ""
68msgstr ""
69"Project-Id-Version: xyz\n"
70"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
71"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
72"Last-Translator: Kab Def <ke@zzz.uucp>\n"
73"Language-Team: German <i18n@zzz.uucp>\n"
74"MIME-Version: 1.0\n"
75"Content-Type: text/plain; charset=ISO-8859-1\n"
76"Content-Transfer-Encoding: 8bit\n"
77
78#. Help text (HTML-like) START
79#: clients/inst_ask_config.ycp:119
80msgid "Congratulations!"
81msgstr "Gl�ckwunsch!"
82EOF
83
84: ${DIFF=diff}
85${DIFF} mcat-test5.ok mcat-test5.out
86result=$?
87
88exit $result
89