| 1 |
#!/usr/bin/perl -w |
| 2 |
# -*- perl -*- |
| 3 |
|
| 4 |
# |
| 5 |
# $Id: $ |
| 6 |
# Author: Slaven Rezic |
| 7 |
# |
| 8 |
|
| 9 |
use strict; |
| 10 |
|
| 11 |
use Tk; |
| 12 |
|
| 13 |
BEGIN { |
| 14 |
if (!eval q{ |
| 15 |
use Test::More; |
| 16 |
1; |
| 17 |
}) { |
| 18 |
print "1..0 # skip: no Test::More module\n"; |
| 19 |
exit; |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
plan tests => 3; |
| 24 |
|
| 25 |
my $mw = tkinit; |
| 26 |
$mw->geometry("+10+10"); |
| 27 |
|
| 28 |
my $b = $mw->Button->pack; |
| 29 |
like(join("\n", $b->bindDump), qr{Binding tag.*Tk::Button.*has these bindings}, "bindDump with Button"); |
| 30 |
|
| 31 |
my $c = $mw->Canvas->pack; |
| 32 |
like(join("\n", $c->bindDump), qr{Binding tag.*Tk::Canvas.*has these bindings}, "bindDump with Canvas"); |
| 33 |
|
| 34 |
my $l = $mw->Label->pack; |
| 35 |
like(join("\n", $l->bindDump), qr{Binding tag.*Tk::Label.*has no bindings}, "bindDump with Label"); |
| 36 |
|
| 37 |
__END__ |