~ubuntu-branches/ubuntu/trusty/horae/trusty

« back to all changes in this revision

Viewing changes to 0CPAN/Tk-Splashscreen-1.0/test.pl

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2008-02-23 23:13:02 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080223231302-mnyyxs3icvrus4ke
Tags: 066-3
Apply patch to athena_parts/misc.pl for compatibility with 
perl-tk 804.28.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!perl -w
2
 
use Test;
3
 
use strict;
4
 
 
5
 
BEGIN { plan tests => 11 };
6
 
 
7
 
eval { require Tk; };
8
 
ok($@, "", "loading Tk module");
9
 
 
10
 
my $mw;
11
 
eval {$mw = Tk::MainWindow->new();};
12
 
ok($@, "", "can't create MainWindow");
13
 
ok(Tk::Exists($mw), 1, "MainWindow creation failed");
14
 
eval { $mw->geometry('+10+10'); };
15
 
 
16
 
my $w;
17
 
my $class = 'Splashscreen';
18
 
 
19
 
eval "require Tk::$class;";
20
 
ok($@, "", "Error loading Tk::$class");
21
 
 
22
 
eval { $w = $mw->$class(); };
23
 
ok($@, "", "can't create $class widget");
24
 
skip($@, Tk::Exists($w), 1, "$class instance does not exist");
25
 
 
26
 
if (Tk::Exists($w)) {
27
 
#    eval { $w->pack; };
28
 
#    ok ($@, "", "Can't pack a $class widget");
29
 
    eval { $mw->update; };
30
 
    ok ($@, "", "Error during 'update' for $class widget");
31
 
 
32
 
    eval { my @dummy = $w->configure; };
33
 
    ok ($@, "", "Error: configure list for $class");
34
 
    eval { $mw->update; };
35
 
    ok ($@, "", "Error: 'update' after configure for $class widget");
36
 
 
37
 
    eval { $w->destroy; };
38
 
    ok($@, "", "can't destroy $class widget");
39
 
    ok(!Tk::Exists($w), 1, "$class: widget not really destroyed");
40
 
} else  { 
41
 
    for (1..5) { skip (1,1,1, "skipped because widget couldn't be created"); }
42
 
}
43
 
 
44
 
1;