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