to.pm.org Jan 2005 Testing the Testers #15

Test::Builder::Tester

use strict;
use Test::More tests => 3;
use Test::Builder::Tester;
use_ok('Test::Foo');

test_out("ok 1 - test if 'foo' eq 'foo'");
foo_ok('foo');
test_test("'foo_ok passes if passed 'foo'");

test_out("not ok 1 - test if 'bar' eq 'foo'");
test_fail(+2);
test_diag("'bar' does not equal 'foo'");
foo_ok('bar');
test_test("'foo_ok fails if passed 'bar'");
< | ^ | >
Copyright © 2005 James FitzGibbon