sync a bunch of files with Test::Simple 0.86
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / Tester / tbt_01basic.t
1 #!/usr/bin/perl
2 # $Id$
3
4 use Test::Builder::Tester tests => 9;
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");
26 test_err("#     Failed test ($0 at line 29)");
27 test_err("#          got: 'foo'");
28 test_err("#     expected: 'bar'");
29 is("foo","bar","should fail");
30 test_test("testing failing");
31
32
33 test_out("not ok 1");
34 test_out("not ok 2");
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
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");
46 test_test("testing failing on the same line with the same name");
47
48
49 test_out("not ok 1 - name # TODO Something");
50 test_err("#     Failed (TODO) test ($0 at line 53)");
51 TODO: { 
52     local $TODO = "Something";
53     fail("name");
54 }
55 test_test("testing failing with todo");
56