Synch with CPAN Test-Simple 1.302140.
[perl.git] / cpan / Test-Simple / t / Legacy_And_Test2 / thread_init_warning.t
1 use strict;
2 use warnings;
3
4 use Test2::Util qw/CAN_THREAD/;
5 BEGIN {
6     unless(CAN_THREAD) {
7         require Test::More;
8         Test::More->import(skip_all => "threads are not supported");
9     }
10 }
11
12 use threads;
13
14 my @warns;
15 {
16     local $SIG{__WARN__} = sub { push @warns => @_ };
17     require Test::More;
18 }
19
20 Test::More::is_deeply(\@warns, [], "No init warning");
21
22 Test::More::done_testing();