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