1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test --add-location=file option. 5 6cat <<\EOF > mco-test7.po 7# Chinese translation for GNU gettext messages. 8# 9msgid "" 10msgstr "" 11"MIME-Version: 1.0\n" 12"Content-Type: text/plain; charset=big5\n" 13"Content-Transfer-Encoding: 8bit\n" 14 15#: src/msgcmp.c:155 src/msgmerge.c:273 16msgid "exactly 2 input files required" 17msgstr "���\��ݭn��n���w��ӿ�J��" 18EOF 19 20: ${MSGCONV=msgconv} 21${MSGCONV} --add-location=file --to-code=UTF-8 \ 22 -o mco-test7.out mco-test7.po || Exit 1 23 24cat <<\EOF > mco-test7.ok 25# Chinese translation for GNU gettext messages. 26# 27msgid "" 28msgstr "" 29"MIME-Version: 1.0\n" 30"Content-Type: text/plain; charset=UTF-8\n" 31"Content-Transfer-Encoding: 8bit\n" 32 33#: src/msgcmp.c src/msgmerge.c 34msgid "exactly 2 input files required" 35msgstr "此功能需要恰好指定兩個輸入檔" 36EOF 37 38: ${DIFF=diff} 39# Redirect stdout, so as not to fill the user's screen with non-ASCII bytes. 40${DIFF} mco-test7.ok mco-test7.out >/dev/null 41result=$? 42 43exit $result 44