1#!/usr/bin/perl -w
2use strict;
3use warnings;
4
5use Test2::Util qw/CAN_THREAD/;
6BEGIN {
7    unless(CAN_THREAD) {
8        require Test::More;
9        Test::More->import(skip_all => "threads are not supported");
10    }
11}
12use threads;
13
14BEGIN {
15    if( $ENV{PERL_CORE} ) {
16        chdir 't';
17        @INC = '../lib';
18    }
19}
20
21use strict;
22use Test::Builder;
23
24my $Test = Test::Builder->new;
25$Test->exported_to('main');
26$Test->plan(tests => 6);
27
28for(1..5) {
29	'threads'->create(sub { 
30          $Test->ok(1,"Each of these should app the test number") 
31    })->join;
32}
33
34$Test->is_num($Test->current_test(), 5,"Should be five");
35