1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test handling of input files with different charsets: 5# 1. UTF-8, 2. ISO-8859-1; plus --use-first 6 7cat <<\EOF > mcat-test4.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=UTF-8\n" 21"Content-Transfer-Encoding: 8bit\n" 22 23#. Remind user of the login name he chose 24#: clients/inst_ask_config.ycp:72 25#, ycp-format 26msgid "You can log in as \"%1\"." 27msgstr "Sie können sich als \"%1\" einloggen." 28EOF 29 30cat <<\EOF > mcat-test4.in2 31# German message file for xyz. 32# Copyright (C) 1999, 2000, 2001 xyz. 33# Kab Def <ke@zzz.uucp>, 2000. 34# 35msgid "" 36msgstr "" 37"Project-Id-Version: xyz\n" 38"POT-Creation-Date: 2001-04-24 12:51:34+0200\n" 39"PO-Revision-Date: 2001-04-24 13:02+02:00\n" 40"Last-Translator: Kab Def <ke@zzz.uucp>\n" 41"Language-Team: German <i18n@zzz.uucp>\n" 42"MIME-Version: 1.0\n" 43"Content-Type: text/plain; charset=ISO-8859-1\n" 44"Content-Transfer-Encoding: 8bit\n" 45 46#. Help text (HTML-like) START 47#: clients/inst_ask_config.ycp:119 48msgid "" 49"Congratulations!" 50msgstr "" 51"Gl�ckwunsch!" 52EOF 53 54rm -f mcat-test4.tmp 55 56: ${MSGCAT=msgcat} 57LC_MESSAGES=C LC_ALL= \ 58${MSGCAT} --use-first --more-than=0 -o mcat-test4.tmp \ 59 mcat-test4.in1 mcat-test4.in2 >mcat-test4.err 2>&1 60result=$? 61cat mcat-test4.err | grep -v 'warning: .* encodings' | grep -v '^ ' 62test $result = 0 || { Exit 1; } 63LC_ALL=C tr -d '\r' < mcat-test4.tmp > mcat-test4.out || Exit 1 64 65cat << \EOF > mcat-test4.ok 66# German message file for xyz. 67# Copyright (C) 1999, 2000, 2001 xyz. 68# Kab Def <ke@zzz.uucp>, 2000. 69# 70msgid "" 71msgstr "" 72"Project-Id-Version: xyz\n" 73"POT-Creation-Date: 2001-04-24 12:51:34+0200\n" 74"PO-Revision-Date: 2001-04-24 13:02+02:00\n" 75"Last-Translator: Kab Def <ke@zzz.uucp>\n" 76"Language-Team: German <i18n@zzz.uucp>\n" 77"MIME-Version: 1.0\n" 78"Content-Type: text/plain; charset=UTF-8\n" 79"Content-Transfer-Encoding: 8bit\n" 80 81#. Remind user of the login name he chose 82#: clients/inst_ask_config.ycp:72 83#, ycp-format 84msgid "You can log in as \"%1\"." 85msgstr "Sie können sich als \"%1\" einloggen." 86 87#. Help text (HTML-like) START 88#: clients/inst_ask_config.ycp:119 89msgid "Congratulations!" 90msgstr "Glückwunsch!" 91EOF 92 93: ${DIFF=diff} 94${DIFF} mcat-test4.ok mcat-test4.out 95result=$? 96 97exit $result 98