NAME

Test::Easy - Testing made absolute easy.

SYNOPSIS

use Test::Easy;

TEST 'this is my 1st test',
CODE { return 'true if this test passed ok' }
;

TEST 'this is my 2nd test',
CODE { return 'true if this test passed ok' }
;

TEST 'this is my bad test',
CODE { return undef or die "this test failed" }
;

SKIP 'my 2nd test', 'just because ...';
TODO 'my bad test', 'need it good one day ...';

RUN;

DESCRIPTION

JUST ABOUT

Easy testing suite. No plans, no special testing logic. Absolutely easy just like this:

do { TEST 'label' => CODE { return 'defined value' } and RUN }

All other sub's should be just tools to decide whether to return 'defined' or undef value.

No plans at all. (Isn't it a bug if I forget to change number of plans?)

SKIPs and TODOs are based on regular expression matching TEST labels. Just give your tests smart labels (/my/testing/group1) and enjoy.

NOTE 1: what's SKIPped will never be 'TODO'.

NOTE 2: both SKIP or TODO can be invoked from within CODE block to reflect run-time or conditional options. But don't expect to SKIP 'my self' when the test just run. (You can SKIP 'the other following tests' only)

All tests are run by the RUN call. (Offering new testing ideas.) Order of tests remains same as they appeared within the script file. When died, it still reports usefull line numbers.

EXPORT

TEST CODE RUN SKIP TODO

STYLE

#style1

TEST 'descriptive/label/of/what/to/test',
CODE
{
	return 'some_true_to_OK';
};

#style2

TEST 'descriptive/label/of/what/to/test' => CODE
{
	return test::is_true( 'some_true_to_OK' );
};

#style3

TEST 'descriptive/label/of/what/to/test',
CODE { return 'true if this test passed ok' }
;

TODO

dirty way exported tools functions into dummy namespace `test::'

test::is_undef
test::is_true
test::is_false

AUTHOR

Daniel Peder, <DanPeder@CPAN.ORG>, <Daniel.Peder@InfoSet.COM>, <http://www.InfoSet.com>

COPYRIGHT

Copyright 2002 Daniel Peder.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REVISION

$Id: Easy.pm_rev 1.8 2003/12/12 09:03:33 root Exp $

HISTORY

$Log: Easy.pm_rev $
Revision 1.8  2003/12/12 09:03:33  root
minor source code changes: use vars $VERSION
distro changes: added t/use.t

Revision 1.7  2002/12/07 12:30:23  root
version 1.00 stable for release

SEE ALSO

Test::Tutorial, Test::Simple, Test::More, perl(1).