File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11Changes for Perl extension Test-Class
22
3+ - fix new teardown tests for MSWin32
4+
350.45 [2014-07-05]
46 - bump minimum required version of Test::More (RT#96951)
57
Original file line number Diff line number Diff line change 33use strict;
44use warnings;
55
6+ my $line ;
67{
78 package TeardownWhenTestDies ;
89 use base qw( Test::Class) ;
@@ -11,7 +12,7 @@ use warnings;
1112 sub setup_that_runs : Test( setup => 1 ) { ok(1, " setup works" ); }
1213
1314 sub my_test_method : Tests {
14- die " oops!" ;
15+ BEGIN { $line = __LINE__ } die " oops!" ;
1516 }
1617
1718 sub teardown_that_runs : Test( teardown => 1 ) {
@@ -21,7 +22,7 @@ use warnings;
2122
2223use Test::Builder::Tester tests => 1;
2324
24- test_out(" ok 1 - setup works\n not ok 2 - my_test_method died (oops! at t/teardown-when-test-dies.t line 14 .)\n ok 3 - teardown is run" );
25+ test_out(" ok 1 - setup works\n not ok 2 - my_test_method died (oops! at ${ \ __FILE__ } line $line .)\n ok 3 - teardown is run" );
2526test_fail( +2 );
2627test_err( " # (in TeardownWhenTestDies->my_test_method)" );
2728Test::Class-> runtests;
You can’t perform that action at this time.
0 commit comments