1#!/usr/bin/expect -f
2spawn tests/conv_encoding Japanese CP50220raw eucJP-win
3set timeout 1
4
5expect_after {
6    "\[^\r\n\]*\r\n" { fail $test }
7}
8
9set test "81 - 87ku"
10send "\xf5\xba\xf6\xec\xf7\xc9\xf8\xb3\xf9\xa1\xfa\xa1\xfb\xa1\r"
11expect {
12    "%1b%24%42%75%3a%76%6c%77%49%78%33%79%21%7a%21%7b%21%1b%28%42 (20)\r\n" { pass $test }
13}
14
15
16set test "kanji + kana"
17send "���ܸ�ƥ���\r"
18expect {
19    "%1b%24%42%46%7c%4b%5c%38%6c%25%46%25%39%25%48%1b%28%42 (18)\r\n" { pass $test }
20}
21
22set test "full-width numerics"
23send "��������������������\r"
24expect {
25    "%1b%24%42%23%30%23%31%23%32%23%33%23%34%23%35%23%36%23%37%23%38%23%39%1b%28%42 (26)\r\n" { pass $test }
26}
27
28set test "full-width numerics"
29send "��"
30expect {
31    "%1b%24%42%2d%42%1b%28%42 (8)\r\n" { pass $test }
32}
33
34