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