Debian Codegraph @

t/iso8859-1.t

raw
1 use Tk;
2 use Test;
3 #use utf8;
4 plan tests => (0x100-0xa0)*1;
5 my $mw = MainWindow->new;
6 my @but;
7
8 for my $i (0xa0..0xff)
9 {
10 my $s = chr($i);
11 push(@but,$mw->Button(-text => $s));
12 my $x = $but[-1]->cget('-text');
13 ok(ord($x),$i,"Number not equal");
14 # ok($x,$s,"Text not equal");
15 if ($i % 16 == 15)
16 {
17 Tk::grid(splice(@but,0,16));
18 }
19 }
20 $mw->geometry("+20+20");
21 $mw->after(2000,[destroy => $mw]);
22 MainLoop;
23