File: Trace.t

package info (click to toggle)
perl-tk 1%3A800.024-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 18,528 kB
  • ctags: 19,152
  • sloc: ansic: 206,767; perl: 40,255; makefile: 4,370; sh: 2,290; yacc: 762
file content (18 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
BEGIN { $|=1; $^W=1; }
use strict;
use Test;
use Tk;
plan test => 5;
my $var = 'One';
my $mw = MainWindow->new;
my $e  = $mw->Entry(-textvariable => \$var)->pack;
ok($e->get,$var,"Entry not initialized from variable");
$e->delete(0,'end');
ok($var,'',"Delete does not change variable");
$e->insert(0,'Two');
ok($var,'Two',"Insert does not change variable");
$var = 'Three';
ok($e->get,$var,"Entry does not track variable assignment");
chop($var);
ok($e->get,'Thre',"Entry does not track chop-ing variable");