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