4 if( $ENV{PERL_CORE} ) {
10 use Test::Builder::Tester tests => 12;
13 ok(1,"This is a basic test");
15 test_out("ok 1 - tested");
17 test_test("captured okay on basic");
19 test_out("ok 1 - tested");
21 test_test("captured okay again without changing number");
23 ok(1,"test unrelated to Test::Builder::Tester");
25 test_out("ok 1 - one");
26 test_out("ok 2 - two");
29 test_test("multiple tests");
31 test_out("not ok 1 - should fail");
32 test_err("# Failed test ($0 at line 28)");
33 test_err("# got: 'foo'");
34 test_err("# expected: 'bar'");
35 is("foo","bar","should fail");
36 test_test("testing failing");
42 test_test("testing failing on the same line with no name");
45 test_fail(+2, 'name');
46 test_fail(+1, 'name_two');
47 fail("name"); fail("name_two");
48 test_test("testing failing on the same line with the same name");
51 test_out("not ok 1 - name # TODO Something");
52 my $line = __LINE__ + 4;
53 test_err("# Failed (TODO) test ($0 at line $line)");
55 local $TODO = "Something";
58 test_test("testing failing with todo");
62 test_test("testing passing with test_pass()");
64 test_pass("some description");
65 pass("some description");
66 test_test("testing passing with test_pass() and description");
68 test_pass("one test");
69 test_pass("... and another");
71 ok(1, "... and another");
72 test_test("testing pass_test() and multiple tests");