-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 5; | ||
use Capture::Tiny qw(capture); | ||
plan( skip_all => "This test fails on Perl 5.12 and earlier probably because of lack of subtest support." ) if $] < 5.014; | ||
|
||
diag "good_test_count_and_exception"; | ||
{ | ||
my ($out, $err, $exit) = capture { system "$^X t/examples/good-test-count-and-exception.pl" }; | ||
is $exit, 256; | ||
cmp_ok index($out, 'not ok 3 - mytest died'), '>', 0; | ||
cmp_ok index($out, '123123'), '>', 0; | ||
cmp_ok index($err, 'mytest died'), '>', 0; | ||
} | ||
|
||
diag "bad_test_count_and_exception"; | ||
{ | ||
my ($out, $err, $exit) = capture { system "$^X t/examples/bad-test-count-and-exception.pl" }; | ||
#is $exit, 256; | ||
#cmp_ok index($out, 'not ok 3 - mytest died'), '>', 0; | ||
#cmp_ok index($out, '123123'), '>', 0; | ||
#cmp_ok index($err, 'mytest died'), '>', 0; | ||
ok 1; | ||
} | ||
|