This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test-Simple-0.62.
[perl5.git] / lib / Test / Simple / t / tbt_01basic.t
1 #!/usr/bin/perl
2
3 use Test::Builder::Tester tests => 9;
4 use Test::More;
5
6 ok(1,"This is a basic test");
7
8 test_out("ok 1 - tested");
9 ok(1,"tested");
10 test_test("captured okay on basic");
11
12 test_out("ok 1 - tested");
13 ok(1,"tested");
14 test_test("captured okay again without changing number");
15
16 ok(1,"test unrelated to Test::Builder::Tester");
17
18 test_out("ok 1 - one");
19 test_out("ok 2 - two");
20 ok(1,"one");
21 ok(2,"two");
22 test_test("multiple tests");
23
24 test_out("not ok 1 - should fail");
25 test_err("#     Failed test ($0 at line 28)");
26 test_err("#          got: 'foo'");
27 test_err("#     expected: 'bar'");
28 is("foo","bar","should fail");
29 test_test("testing failing");
30
31
32 test_out("not ok 1");
33 test_out("not ok 2");
34 test_fail(+2);
35 test_fail(+1);
36 fail();  fail();
37 test_test("testing failing on the same line with no name");
38
39
40 test_out("not ok 1 - name");
41 test_out("not ok 2 - name");
42 test_fail(+2);
43 test_fail(+1);
44 fail("name");  fail("name");
45 test_test("testing failing on the same line with the same name");
46
47
48 test_out("not ok 1 - name # TODO Something");
49 test_err("#     Failed (TODO) test ($0 at line 52)");
50 TODO: { 
51     local $TODO = "Something";
52     fail("name");
53 }
54 test_test("testing failing with todo");
55