~ubuntu-branches/ubuntu/natty/perl-tk/natty

« back to all changes in this revision

Viewing changes to t/cursor.t

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Zander
  • Date: 2004-03-14 13:54:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314135444-prc09u2or4dbr3to
Tags: 1:800.025-2
Add xlibs-dev to Build-Depends:,
Closes: #237942

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- perl -*-
 
2
BEGIN { $|=1; $^W=1; }
 
3
use strict;
 
4
use Test;
 
5
use Tk;
 
6
 
 
7
BEGIN {
 
8
    if ($Tk::platform eq 'MSWin32') {
 
9
        plan test => 1;
 
10
    } else {
 
11
        plan test => 2, todo => [1];
 
12
    }
 
13
}
 
14
 
 
15
my $mw;
 
16
$mw = Tk::MainWindow->new();
 
17
$mw->geometry('+10+10');  # This works for mwm and interactivePlacement
 
18
 
 
19
if ($Tk::platform eq 'MSWin32') {
 
20
    my $curfile = "demos/demos/images/cursor.cur";
 
21
    $mw->configure(-cursor => $curfile);
 
22
    $mw->update;
 
23
    ok($mw->cget(-cursor), $curfile);
 
24
} else {
 
25
    $mw->configure(-cursor => ['@demos/demos/images/cursor.xbm','black']);
 
26
    $mw->update;
 
27
    $mw->after(200);
 
28
    ok(ref $mw->cget(-cursor) eq 'ARRAY');
 
29
    my $tclcurspec = '@demos/demos/images/cursor.xbm black';
 
30
    $mw->configure(-cursor => $tclcurspec);
 
31
    ok($mw->cget(-cursor), $tclcurspec);
 
32
}
 
33
 
 
34
__END__