Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / calendar / t / 03_threads.t
1 #!/usr/bin/perl -w
2
3 use strict;
4 use Config;
5 use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads';
6 use threads;
7
8 use Wx qw(:everything);
9 use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support';
10 use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif';
11 use Test::More tests => 4;
12 use Wx::Calendar;
13
14 my $app = Wx::App->new( sub { 1 } );
15 my $cda = Wx::CalendarDateAttr->new;
16 my $cda2 = Wx::CalendarDateAttr->new;
17
18 undef $cda2;
19
20 my $t = threads->create
21   ( sub {
22         ok( 1, 'In thread' );
23     } );
24 ok( 1, 'Before join' );
25 $t->join;
26 ok( 1, 'After join' );
27
28 END { ok( 1, 'At END' ) };