Test-Unit-Lite
view release on metacpan or search on metacpan
lib/Test/Unit/Lite.pm view on Meta::CPAN
}
1;
=head2 t/all_tests.t
This is the test script for L<Test::Harness> called with "make test".
#!/usr/bin/perl
use strict;
use warnings;
use File::Spec;
use Cwd;
BEGIN {
unshift @INC, map { /(.*)/; $1 } split(/:/, $ENV{PERL5LIB}) if defined $ENV{PERL5LIB} and ${^TAINT};
my $cwd = ${^TAINT} ? do { local $_=getcwd; /(.*)/; $1 } : '.';
unshift @INC, File::Spec->catdir($cwd, 'inc');
unshift @INC, File::Spec->catdir($cwd, 'lib');
}
use Test::Unit::Lite;
local $SIG{__WARN__} = sub { require Carp; Carp::confess("Warning: $_[0]") };
Test::Unit::HarnessUnit->new->start('Test::Unit::Lite::AllTests');
=head2 t/test.pl
This is the optional script for calling test suite directly.
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
use File::Spec;
use Cwd;
BEGIN {
chdir dirname(__FILE__) or die "$!";
chdir '..' or die "$!";
unshift @INC, map { /(.*)/; $1 } split(/:/, $ENV{PERL5LIB}) if defined $ENV{PERL5LIB} and ${^TAINT};
my $cwd = ${^TAINT} ? do { local $_=getcwd; /(.*)/; $1 } : '.';
unshift @INC, File::Spec->catdir($cwd, 'inc');
unshift @INC, File::Spec->catdir($cwd, 'lib');
}
use Test::Unit::Lite;
local $SIG{__WARN__} = sub { require Carp; Carp::confess("Warning: $_[0]") };
all_tests;
This is perl equivalent of shell command line:
perl -Iinc -Ilib -MTest::Unit::Lite -w -e all_tests
=head1 SEE ALSO
L<Test::Unit>, L<Test::Assert>.
=head1 TESTS
The L<Test::Unit::Lite> was tested as a L<Test::Unit> replacement for following
distributions: L<Test::C2FIT>, L<XAO::Base>, L<Exception::Base>.
=for readme continue
=head1 BUGS
If you find the bug or want to implement new features, please report it at
L<https://github.com/dex4er/perl-Test-Unit-Lite/issues>
The code repository is available at
L<http://github.com/dex4er/perl-Test-Unit-Lite>
=head1 AUTHOR
Piotr Roszatycki <dexter@cpan.org>
=head1 LICENSE
Copyright (c) 2007-2009, 2012 by Piotr Roszatycki <dexter@cpan.org>.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
See L<http://www.perl.com/perl/misc/Artistic.html>
( run in 1.715 second using v1.01-cache-2.11-cpan-39bf76dae61 )