This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test-Simple-0.62.
[perl5.git] / lib / Test / Simple / t / tbt_01basic.t
CommitLineData
845d7e37
SP
1#!/usr/bin/perl
2
3use Test::Builder::Tester tests => 9;
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");
25test_err("# Failed test ($0 at line 28)");
26test_err("# got: 'foo'");
27test_err("# expected: 'bar'");
28is("foo","bar","should fail");
29test_test("testing failing");
30
31
32test_out("not ok 1");
33test_out("not ok 2");
34test_fail(+2);
35test_fail(+1);
36fail(); fail();
37test_test("testing failing on the same line with no name");
38
39
40test_out("not ok 1 - name");
41test_out("not ok 2 - name");
42test_fail(+2);
43test_fail(+1);
44fail("name"); fail("name");
45test_test("testing failing on the same line with the same name");
46
47
48test_out("not ok 1 - name # TODO Something");
49test_err("# Failed (TODO) test ($0 at line 52)");
50TODO: {
51 local $TODO = "Something";
52 fail("name");
53}
54test_test("testing failing with todo");
55