Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / richtext / 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::RichText;
13
14 my $app = Wx::App->new( sub { 1 } );
15 my $rtr = Wx::RichTextRange->new;
16 my $rtr2 = Wx::RichTextRange->new;
17 my $tae = Wx::TextAttrEx->new;
18 my $tae2 = Wx::TextAttrEx->new;
19 my $rta = Wx::RichTextAttr->new;
20 my $rta2 = Wx::RichTextAttr->new;
21 my $rtsd = Wx::RichTextParagraphStyleDefinition->new;
22 my $rtsd2 = Wx::RichTextParagraphStyleDefinition->new;
23 my $rtss = Wx::RichTextStyleSheet->new;
24 my $rtss2 = Wx::RichTextStyleSheet->new;
25
26 undef $rtr2;
27 undef $tae2;
28 undef $rta2;
29 undef $rtsd2;
30 undef $rtss2;
31
32 my $t = threads->create
33   ( sub {
34         ok( 1, 'In thread' );
35     } );
36 ok( 1, 'Before join' );
37 $t->join;
38 ok( 1, 'After join' );
39
40 END { ok( 1, 'At END' ) };