Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / print / 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 Test::More tests => 4;
11 use Wx::Print;
12
13 my $app = Wx::App->new( sub { 1 } );
14 my $printer = Wx::Printer->new;
15 my $printer2 = Wx::Printer->new;
16
17 undef $printer2;
18
19 my $t = threads->create
20   ( sub {
21         ok( 1, 'In thread' );
22     } );
23 ok( 1, 'Before join' );
24 $t->join;
25 ok( 1, 'After join' );
26
27 END { ok( 1, 'At END' ) };