1#!/usr/bin/expect -f
2spawn tests/conv_encoding Japanese Shift_JIS UTF-8
3set timeout 1
4
5expect_after {
6    "\[^\r\n\]*\r\n" { fail $test }
7}
8
9set test "basic test"
10send "testtest\r"
11expect {
12    "%74%65%73%74%74%65%73%74 (8)\r\n" { pass $test }
13}
14
15
16set test "kanji + kana"
17send "日本語テスト\r"
18expect {
19    "%93%fa%96%7b%8c%ea%83%65%83%58%83%67 (12)\r\n" { pass $test }
20}
21
22set test "full-width numerics"
23send "0123456789\r"
24expect {
25    "%82%4f%82%50%82%51%82%52%82%53%82%54%82%55%82%56%82%57%82%58 (20)\r\n" { pass $test }
26}
27
28set test "full-width numerics"
29send "㍊"
30expect {
31    "%3f (1)\r\n" { pass $test }
32}
33
34close
35# vim: sts=4 ts=4 sw=4 et encoding=EUC-JP
36