1#
2#
3#
4
5use strict;
6use vars qw($seq $test %sample %wakachi %yomikata $allascii);
7
8sub ok{ # we don't have test more for 5.00503
9    my $result = shift;
10    my $comment = @_ ? join(" ", " # ", @_) : '';
11    print ($result ? "ok" : "not ok");
12    print " $seq";
13    @_ and print " # ", @_;
14    print "\n";
15    $seq++;
16    return $result;
17}
18
19$sample{'euc'} = unpack('u',<<'eofeof');
20MI+.DSJ2_I-.DSZ'6:V%K87-I9F]R5VEN,S*AUZ3RI<"EIJ7SI>VAO*7)I+>D
21MQL2ZI*VDHJ3JI*RDR*2FI+2DMJ2DI-ZDN:&C"J2SI.RDSVMA:V%S:78R+C(N
22M-2ND[Z2KI,&]\:2MI/)C>6=W:6XL;6EN9W<S,J3'I;.E\Z71I:2EZZ3'I*VD
23MZPJDZ*2FI,NDMZ2_<&%T8VBD\J6SI?.ET:6DI>NTQ+:MI,[,M:2DROVDRZ3B
24MN\BDPZ3&Q+JDL:3KI.BDIE=I;F1O=W.DS@J\PKG4M\&\L*3+I+>DQJ3>I,BD
25MX:2_RJJDQZ2YH:,*NL>_M\C'I,^PRK*\I,Y796)086=E"CQ54DPZ:'1T<#HO
26M+W=W=RYT86UA+F]R+FIP+R4W16ME;GIO+2].86UA>G4O/@JDQ[CXLZNDMZ3&
27MI*2DWJ2YH:.ARKZPH:*DLZ3.I=JAO*6XI,_)K,W7I,NQ_J2XI,:YN;^WI+6D
28*[*3>I+FAHZ'+"@``
29eofeof
30$sample{'sjis'} = unpack('u',<<'eofeof');
31M@K&"S(*]@M&"S8%U:V%K87-I9F]R5VEN,S*!=H+P@U^#18.3@XV!6X-H@K6"
32MQ)*X@JN"H(+H@JJ"QH*D@K*"M(*B@MR"MX%""H*Q@NJ"S6MA:V%S:78R+C(N
33M-2N"[8*I@K^/D8*K@O!C>6=W:6XL;6EN9W<S,H+%@U*#DX-P@T.#BX+%@JN"
34MZ0J"YH*D@LF"M8*]<&%T8VB"\(-2@Y.#<(-#@XN*PHNK@LR6LX*BE?N"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87)E;6%S=2XI"@``
171eofeof
172
173
1741;
175