NAME

Test::Perl::Dist - Test module for Perl::Dist::WiX and subclasses.

VERSION

This document describes Test::Perl::Dist version 0.202

SYNOPSIS

# This is the 901_perl_589.t file from Strawberry.
#!/usr/bin/perl

use strict;
BEGIN {
	$|  = 1;
	$^W = 1;
}

use Test::Perl::Dist;

#####################################################################
# Complete Generation Run

# Create the dist object
my $dist = Test::Perl::Dist->new_test_class_medium(
	901, '589', 'Perl::Dist::Strawberry', 
	msi => 0
);

test_run_dist( $dist );

test_verify_files_medium(901, '58');

done_testing();

DESCRIPTION

This module implements a test framework for Perl::Dist::WiX and subclasses of that module.

Using Test::More is not required, as this module re-exports all its functions.

INTERFACE

Note that this module exports all routines that are in Test::More, in addition to the routines documented here.

The only difference is in done_testing, as documented below.

new_test_class_short =head2 new_test_class_medium =head2 new_test_class_long

my $dist = Test::Perl::Dist->new_test_class_medium(
	901, '589', 'Perl::Dist::Strawberry', 
	msi => 0
);

Returns a distribution class to run and test against that is a subclass of the class being tested.

The first parameter is the test number, the second refers to the version of perl to build (589 for perl 5.8.9, for instance) and the third is the class being tested.

Any parameters after that are passed to the constructor of the distribution class, which passes them on to the class being tested.

If the constructor of the class being tested returns an exception, that exception is printed, and all testing is stopped.

The difference between "short", "medium", and "long" is the expected length of the test. A "short" test installs the dmake binary and should not take more than 5 minutes, a "medium" test installs perl and one additional module and can take about an hour, and a "long" test completes a full build, which can take 4-8 hours on slow machines.

Medium and long tests are skipped at this point unless $ENV{RELEASE_TESTING} contains a true value.

test_run_dist

test_run_dist( $dist );

This runs the distribution class.

If the class being tested returns an exception when ran, that exception is printed, and all testing is stopped.

test_verify_files_short =head2 test_verify_files_medium =head2 test_verify_files_long

test_verify_files_medium(901, '58');

This checks that certain files were created.

The first parameter is the test number, the second parameter refers to the first two parts of the perl version ('58' for 5.8.9, '510' for 5.10.0 or 5.10.1).

test_verify_portability

test_verify_portability(901, $dist->output_base_filename());

This checks that certain files were created that are required for a portable distribution.

The first parameter is the test number, the second parameter is the base filename of the dist being tested, as returned from output_base_filename.

done_testing

done_testing();

# If additional tests were completed.
done_testing(2);

This tells Test::Perl::Dist that all testing is completed.

If there is a parameter, it is the number of additional tests that were completed.

Test::Perl::Dist keeps track of the tests that it completed and adds it to this number.

DIAGNOSTICS

This module implements no diagnostics of its own, but reports diagnostics provided to it by the module being tested.

CONFIGURATION AND ENVIRONMENT

There are no configuration files.

$ENV{RELEASE_TESTING} is checked for a true value if a medium or long test is requested.

There are other environment variables used - check the source for details.

DEPENDENCIES

This module requires perl 5.8.1, parent version 0.221, File::Remove version 1.42, LWP::Online version 1.07, Test::More version 0.88, URI version 1.40, and Win32 version 0.39.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

No bugs have been reported.

Bugs should be reported via:

1) The CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Perl-Dist if you have an account there.

2) Email to <bug-Test-Perl-Dist@rt.cpan.org> if you do not.

AUTHOR

Curtis Jewell <CSJewell@cpan.org>

LICENSE AND COPYRIGHT

Copyright (c) 2009, Curtis Jewell <CSJewell@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either version 5.8.1 or any later version. See perlartistic and perlgpl.

The full text of the license can be found in the LICENSE file included with this module.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.