Commit | Line | Data |
845d7e37 |
1 | #!/usr/bin/perl |
ccbd73a4 |
2 | # $Id: /mirror/googlecode/test-more/t/Tester/tbt_01basic.t 60331 2008-09-09T12:17:12.607612Z schwern $ |
845d7e37 |
3 | |
1be77ff7 |
4 | use Test::Builder::Tester tests => 9; |
845d7e37 |
5 | use Test::More; |
6 | |
7 | ok(1,"This is a basic test"); |
8 | |
9 | test_out("ok 1 - tested"); |
10 | ok(1,"tested"); |
11 | test_test("captured okay on basic"); |
12 | |
13 | test_out("ok 1 - tested"); |
14 | ok(1,"tested"); |
15 | test_test("captured okay again without changing number"); |
16 | |
17 | ok(1,"test unrelated to Test::Builder::Tester"); |
18 | |
19 | test_out("ok 1 - one"); |
20 | test_out("ok 2 - two"); |
21 | ok(1,"one"); |
22 | ok(2,"two"); |
23 | test_test("multiple tests"); |
24 | |
25 | test_out("not ok 1 - should fail"); |
ccbd73a4 |
26 | test_err("# Failed test ($0 at line 29)"); |
845d7e37 |
27 | test_err("# got: 'foo'"); |
28 | test_err("# expected: 'bar'"); |
29 | is("foo","bar","should fail"); |
30 | test_test("testing failing"); |
31 | |
32 | |
1be77ff7 |
33 | test_out("not ok 1"); |
34 | test_out("not ok 2"); |
845d7e37 |
35 | test_fail(+2); |
36 | test_fail(+1); |
37 | fail(); fail(); |
38 | test_test("testing failing on the same line with no name"); |
39 | |
40 | |
1be77ff7 |
41 | test_out("not ok 1 - name"); |
42 | test_out("not ok 2 - name"); |
43 | test_fail(+2); |
44 | test_fail(+1); |
45 | fail("name"); fail("name"); |
845d7e37 |
46 | test_test("testing failing on the same line with the same name"); |
47 | |
48 | |
49 | test_out("not ok 1 - name # TODO Something"); |
ccbd73a4 |
50 | test_err("# Failed (TODO) test ($0 at line 53)"); |
845d7e37 |
51 | TODO: { |
52 | local $TODO = "Something"; |
53 | fail("name"); |
54 | } |
55 | test_test("testing failing with todo"); |
56 | |