blob: 55d0d7c6345e35bcd8b9554e431fa54e98dd5974 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
use strict;
use warnings;
use lib 't/lib';
use Test::Tester;
use MyTest;
my $test = Test::Builder->new;
$test->plan(tests => 2);
sub deeper
{
MyTest::ok(1);
}
{
my @results = run_tests(
sub {
MyTest::ok(1);
deeper();
}
);
local $Test::Builder::Level = 0;
$test->is_num($results[1]->{depth}, 1, "depth 1");
$test->is_num($results[2]->{depth}, 2, "deeper");
}
|