blob: 28febc360012b5c3b5ff22ea48b15243a5b01c83 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#!perl -w
BEGIN {
if( $ENV{PERL_CORE} ) {
chdir 't';
@INC = '../lib';
}
else {
unshift @INC, 't/lib';
}
}
use strict;
use Test::Builder;
use Test::Builder::NoOutput;
use Test::More;
my $TB = Test::Builder->new;
my $test = Test::Builder::NoOutput->create;
$test->plan( tests => 3 );
local $ENV{HARNESS_ACTIVE} = 0;
$test->ok(1, 'Foo');
$TB->is_eq($test->read(), <<END);
1..3
ok 1 - Foo
END
#line 30
$test->ok(0, 'Bar');
$TB->is_eq($test->read(), <<END);
not ok 2 - Bar
# Failed test 'Bar'
# at $0 line 30.
END
$test->ok(1, 'Yar');
$test->ok(1, 'Car');
$TB->is_eq($test->read(), <<END);
ok 3 - Yar
ok 4 - Car
END
#line 45
$test->ok(0, 'Sar');
$TB->is_eq($test->read(), <<END);
not ok 5 - Sar
# Failed test 'Sar'
# at $0 line 45.
END
SKIP: {
skip 'Broken with new stuff' => 1;
$test->_ending();
$TB->is_eq($test->read(), <<' END');
# Looks like you planned 3 tests but ran 5.
# Looks like you failed 2 tests of 5 run.
END
}
$TB->done_testing(5);
|