Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / filesys / 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::FS;
13
14 my $app = Wx::App->new( sub { 1 } );
15 my $fs = Wx::FileSystem->new;
16 my $fs2 = Wx::FileSystem->new;
17
18 my $fsfile = $fs->OpenFile( 't/03_threads.t' );
19 my $fsfile2 = $fs->OpenFile( 't/02_inheritance.t' );
20
21 undef $fs2;
22 undef $fsfile2;
23
24 my $t = threads->create
25   ( sub {
26         ok( 1, 'In thread' );
27     } );
28 ok( 1, 'Before join' );
29 $t->join;
30 ok( 1, 'After join' );
31
32 END { ok( 1, 'At END' ) };