X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F22dump.t;h=1f4e0dbbbb64d781485cce31d391df04f695a4cb;hb=3b7ea110ea6e400d497b05e8e366db10e30abfdb;hp=50a124c3951906d1f645bb1c547deadf5500b54c;hpb=9f98bd820b2634ba37e61054000e67199511e0cd;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/22dump.t b/t/22dump.t index 50a124c..1f4e0db 100644 --- a/t/22dump.t +++ b/t/22dump.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Test::More; use Test::Exception; use Test::Warn; @@ -30,8 +31,8 @@ my $dump_path = "$tdir/dump"; rmtree($dump_path, 1, 1); lives_ok { - warnings_exist { DBICTest::Schema::1->connect($make_dbictest_db::dsn) } - [ qr|^Dumping manual schema|, qr|^Schema dump completed| ]; + warnings_exist { DBICTest::Schema::1->connect($make_dbictest_db::dsn) } + [ qr|^Dumping manual schema|, qr|^Schema dump completed| ]; } 'no death with dump_directory set' or diag "Dump failed: $@"; is_deeply( @@ -43,24 +44,24 @@ is_deeply( DBICTest::Schema::1->_loader_invoked(undef); SKIP: { - skip "ActiveState perl produces additional warnings", 1 - if ($^O eq 'MSWin32'); + skip "ActiveState perl produces additional warnings", 1 + if ($^O eq 'MSWin32'); - warnings_exist { DBICTest::Schema::1->connect($make_dbictest_db::dsn) } - [ qr|^Dumping manual schema|, qr|^Schema dump completed| ]; + warnings_exist { DBICTest::Schema::1->connect($make_dbictest_db::dsn) } + [ qr|^Dumping manual schema|, qr|^Schema dump completed| ]; - is_deeply( - [ sort @{ DBICTest::Schema::1->loader->generated_classes } ], - [ ], - 'no classes generated on second dump' - ); + is_deeply( + [ sort @{ DBICTest::Schema::1->loader->generated_classes } ], + [ ], + 'no classes generated on second dump' + ); - rmtree($dump_path, 1, 1); + rmtree($dump_path, 1, 1); } lives_ok { - warnings_exist { DBICTest::Schema::2->connect($make_dbictest_db::dsn) } - [ qr|^Dumping manual schema|, qr|^Schema dump completed| ]; + warnings_exist { DBICTest::Schema::2->connect($make_dbictest_db::dsn) } + [ qr|^Dumping manual schema|, qr|^Schema dump completed| ]; } 'no death with dump_directory set (overwrite1)' or diag "Dump failed: $@"; is_deeply( @@ -72,14 +73,14 @@ is_deeply( DBICTest::Schema::2->_loader_invoked(undef); lives_ok { - warnings_exist { DBICTest::Schema::2->connect($make_dbictest_db::dsn) } - [ - qr/^Dumping manual schema/, - qr|^Deleting .+Schema/2.+ due to 'really_erase_my_files'|, - qr|^Deleting .+Schema/2/Result/Foo.+ due to 'really_erase_my_files'|, - qr|^Deleting .+Schema/2/Result/Bar.+ due to 'really_erase_my_files'|, - qr/^Schema dump completed/ - ]; + warnings_exist { DBICTest::Schema::2->connect($make_dbictest_db::dsn) } + [ + qr/^Dumping manual schema/, + qr|^Deleting .+Schema/2.+ due to 'really_erase_my_files'|, + qr|^Deleting .+Schema/2/Result/Foo.+ due to 'really_erase_my_files'|, + qr|^Deleting .+Schema/2/Result/Bar.+ due to 'really_erase_my_files'|, + qr/^Schema dump completed/ + ]; } 'no death with dump_directory set (overwrite2)' or diag "Dump failed: $@"; is_deeply(