"Fossies" - the Fresh Open Source Software Archive 
Member "Tk-804.036/t/autoload.t" (15 Nov 2013, 533 Bytes) of package /linux/misc/Tk-804.036.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 BEGIN { $^W = 1; $| = 1;}
2 use Test;
3 plan tests => 5;
4 use Tk;
5 my $method;
6
7 sub warn_handler
8 {
9 local $_ = shift;
10 ok($_ =~ /^Assuming 'require Tk::$method;/,1,"Wrong warning:$_");
11 }
12
13 $SIG{'__WARN__'} = \&warn_handler;
14
15 my $mw = MainWindow->new;
16 $method = 'Nonwidget';
17 Tk::catch { $mw->$method() };
18 ok($@ =~ /Can't locate/,1,"Wrong error:$@");
19 $method = 'BrowseEntry';
20 $mw->$method();
21 ok(defined(&Tk::Widget::BrowseEntry),1,"Autoload failed");
22 $method = 'Entry';
23 $mw->$method();
24 ok(defined(&Tk::Widget::Entry),1,"Autoload failed");
25
26
27