1 #! /bin/sh 2 3 # Test conversion from UTF-8 to BIG5. 4 # Test that encoding names are case insensitive. 5 6 tmpfiles="" 7 trap 'rm -fr $tmpfiles' 1 2 3 15 8 9 tmpfiles="$tmpfiles mco-test2.po" 10 cat <<\EOF > mco-test2.po 11 # Chinese translation for GNU gettext messages. 12 # 13 msgid "" 14 msgstr "" 15 "MIME-Version: 1.0\n" 16 "Content-Type: text/plain; charset=UTF-8\n" 17 "Content-Transfer-Encoding: 8bit\n" 18 19 #: src/msgcmp.c:155 src/msgmerge.c:273 20 msgid "exactly 2 input files required" 21 msgstr "" 22 EOF 23 24 tmpfiles="$tmpfiles mco-test2.out" 25 : ${MSGCONV=msgconv} 26 ${MSGCONV} -t Big5 -o mco-test2.out mco-test2.po 27 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 28 29 tmpfiles="$tmpfiles mco-test2.ok" 30 cat <<\EOF > mco-test2.ok 31 # Chinese translation for GNU gettext messages. 32 # 33 msgid "" 34 msgstr "" 35 "MIME-Version: 1.0\n" 36 "Content-Type: text/plain; charset=BIG5\n" 37 "Content-Transfer-Encoding: 8bit\n" 38 39 #: src/msgcmp.c:155 src/msgmerge.c:273 40 msgid "exactly 2 input files required" 41 msgstr "\nnwJ" 42 EOF 43 44 : ${DIFF=diff} 45 # Redirect stdout, so as not to fill the user's screen with non-ASCII bytes. 46 ${DIFF} mco-test2.ok mco-test2.out >/dev/null 47 result=$? 48 49 rm -fr $tmpfiles 50 51 exit $result 52