Commit | Line | Data |
845d7e37 |
1 | #!/usr/bin/perl |
2 | |
1be77ff7 |
3 | use Test::Builder::Tester tests => 9; |
845d7e37 |
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"); |
3e887aae |
25 | test_err("# Failed test ($0 at line 28)"); |
845d7e37 |
26 | test_err("# got: 'foo'"); |
27 | test_err("# expected: 'bar'"); |
28 | is("foo","bar","should fail"); |
29 | test_test("testing failing"); |
30 | |
31 | |
1be77ff7 |
32 | test_out("not ok 1"); |
33 | test_out("not ok 2"); |
845d7e37 |
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 | |
1be77ff7 |
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"); |
845d7e37 |
45 | test_test("testing failing on the same line with the same name"); |
46 | |
47 | |
48 | test_out("not ok 1 - name # TODO Something"); |
3e887aae |
49 | test_err("# Failed (TODO) test ($0 at line 52)"); |
845d7e37 |
50 | TODO: { |
51 | local $TODO = "Something"; |
52 | fail("name"); |
53 | } |
54 | test_test("testing failing with todo"); |
55 | |