Skip to content

Commit

Permalink
Merge pull request #16 from exodist/master
Browse files Browse the repository at this point in the history
Fix things to work with Test::Stream
  • Loading branch information
karenetheridge committed Sep 27, 2014
2 parents b23aa22 + 5a1a931 commit b6c0945
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions t/fail2.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ my $identifier = ($Test::More::VERSION < 0.88) ? 'object' : 'thing';
test_out(qr/not ok 1 - (?:The $identifier|undef) isa '?Object'?\n/);
test_out("not ok 2 - cannot create Objects");
test_fail(-12);
test_err( "# (in Object::Test->_test_new)" );
test_err(qr/#\s+(?:The $identifier|undef) isn't defined\n/);
test_fail(-15);
test_err( $_ ) for $INC{'Test/Stream.pm'}
? (qr/#\s+(?:The $identifier|undef) isn't defined\n/, "# (in Object::Test->_test_new)")
: ("# (in Object::Test->_test_new)", qr/#\s+(?:The $identifier|undef) isn't defined\n/);
test_fail(-16);
test_err( "# (in Object::Test->_test_new)" );

Object::Test->runtests;
Expand Down
10 changes: 6 additions & 4 deletions t/runtests_die.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ my $identifier = ($Test::More::VERSION < 0.88) ? 'object' : 'thing';

test_out( qr/not ok 1 - (?:The $identifier|undef) isa '?Object'?\n/);
test_err( "# Failed test ($filename at line 15)");
test_err( "# (in Foo->test_object)" );
test_err( qr/# (?:The $identifier|undef) isn't defined\n/);
test_err( $_ ) for $INC{'Test/Stream.pm'}
? ( qr/# (?:The $identifier|undef) isn't defined\n/, "# (in Foo->test_object)")
: ( "# (in Foo->test_object)", qr/# (?:The $identifier|undef) isn't defined\n/);
test_out( "not ok 2 - test_object died (could not create object)");
test_err( "# Failed test ($filename at line 33)");
test_err( "# (in Foo->test_object)" );
test_err( $_ ) for $INC{'Test/Stream.pm'}
? ("# Failed test ($filename at line 35)", "# (in Foo->test_object)")
: ("# (in Foo->test_object)", "# Failed test ($filename at line 35)");
Foo->runtests;
test_test("early die handled");

0 comments on commit b6c0945

Please sign in to comment.