X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F22dump.t;h=671021e9b8440d87d65a41fcdd4378756d3204bc;hb=e1373c52a2c94d82334371f5b6bb3bd70ac320c9;hp=cdb0f5015ddd30e5dde1fc8e6471ae3486d40fbd;hpb=12c918bdefc9be6e6515f433d6199608a1ca4a58;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/22dump.t b/t/22dump.t index cdb0f50..671021e 100644 --- a/t/22dump.t +++ b/t/22dump.t @@ -6,6 +6,11 @@ use make_dbictest_db; my $dump_path = './t/_dump'; +local $SIG{__WARN__} = sub { + warn $_[0] unless $_[0] =~ + /really_erase_my_files|Dumping manual schema|Schema dump completed/; +}; + { package DBICTest::Schema::1; use base qw/ DBIx::Class::Schema::Loader /; @@ -33,7 +38,12 @@ ok(!$@, 'no death with dump_directory set') or diag "Dump failed: $@"; DBICTest::Schema::1->_loader_invoked(undef); SKIP: { - skip "ActiveState perl produces additional warnings", 3 + my @warnings_regexes = ( + qr|Dumping manual schema|, + qr|Schema dump completed|, + ); + + skip "ActiveState perl produces additional warnings", scalar @warnings_regexes if ($^O eq 'MSWin32'); my @warn_output; @@ -41,10 +51,6 @@ SKIP: { local $SIG{__WARN__} = sub { push(@warn_output, @_) }; DBICTest::Schema::1->connect($make_dbictest_db::dsn); } - my @warnings_regexes = ( - qr|Dumping manual schema|, - qr|Schema dump completed|, - ); like(shift @warn_output, $_) foreach (@warnings_regexes);