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

« back to all changes in this revision

Viewing changes to 0CPAN/Tk-GBARR-2.06/t/2numentry.t

  • 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
 
use strict;
2
 
use vars '$loaded';
3
 
BEGIN { $^W= 1; $| = 1; print "1..7\n"; }
4
 
END {print "not ok 1\n" unless $loaded;}
5
 
use Tk::NumEntry;
6
 
$loaded = 1;
7
 
my $ok = 1;
8
 
print "ok " . $ok++ . "\n";
9
 
 
10
 
my $top = new MainWindow;
11
 
my $ne;
12
 
eval {
13
 
    $ne = $top->NumEntry->pack;
14
 
};
15
 
if ($@) { print "not " } print "ok " . $ok++ . "\n";
16
 
 
17
 
eval {
18
 
    $top->NumEntry(-orient => "horizontal")->pack;
19
 
};
20
 
if ($@) { print "not " } print "ok " . $ok++ . "\n";
21
 
 
22
 
$ne->configure(-value => 1);
23
 
if ($ne->cget(-value) != 1) { print "not " } print "ok " . $ok++ . "\n";
24
 
 
25
 
$ne->incdec(1);
26
 
if ($ne->cget(-value) != 2) { print "not " } print "ok " . $ok++ . "\n";
27
 
 
28
 
$ne->incdec(-1);
29
 
if ($ne->cget(-value) != 1) { print "not " } print "ok " . $ok++ . "\n";
30
 
 
31
 
{
32
 
    my $ne2 = $top->NumEntry(-readonly => 1);
33
 
    if (!$ne2->isa("Tk::NumEntry")) { print "not " }
34
 
    print "ok " . $ok++ . "\n";
35
 
}
36
 
 
37
 
#Tk::MainLoop;