Enzhen Huang | 21b3503 | 2021-07-08 09:03:37 -0700 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | . "${srcdir=.}/init.sh"; path_prepend_ . ../src |
| 3 | |
| 4 | # Test conversion from BIG5 to UTF-8. |
| 5 | |
| 6 | cat <<\EOF > mco-test1.po |
| 7 | # Chinese translation for GNU gettext messages. |
| 8 | # |
| 9 | msgid "" |
| 10 | msgstr "" |
| 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 |
| 16 | msgid "exactly 2 input files required" |
| 17 | msgstr "¦¹¥\¯à»Ýn«ê¦n«ü©w¨âÓ¿é¤JÀÉ" |
| 18 | EOF |
| 19 | |
| 20 | : ${MSGCONV=msgconv} |
| 21 | ${MSGCONV} --to-code=UTF-8 -o mco-test1.out mco-test1.po || Exit 1 |
| 22 | |
| 23 | cat <<\EOF > mco-test1.ok |
| 24 | # Chinese translation for GNU gettext messages. |
| 25 | # |
| 26 | msgid "" |
| 27 | msgstr "" |
| 28 | "MIME-Version: 1.0\n" |
| 29 | "Content-Type: text/plain; charset=UTF-8\n" |
| 30 | "Content-Transfer-Encoding: 8bit\n" |
| 31 | |
| 32 | #: src/msgcmp.c:155 src/msgmerge.c:273 |
| 33 | msgid "exactly 2 input files required" |
| 34 | msgstr "æ¤åè½éè¦æ°å¥½æå®å
©å輸å
¥æª" |
| 35 | EOF |
| 36 | |
| 37 | : ${DIFF=diff} |
| 38 | # Redirect stdout, so as not to fill the user's screen with non-ASCII bytes. |
| 39 | ${DIFF} mco-test1.ok mco-test1.out >/dev/null |
| 40 | result=$? |
| 41 | |
| 42 | exit $result |