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