- USE AS A TEST FILE
- COPYRIGHT & LICENSE
Test::Dist::VersionSync - Verify that all the modules in a distribution have the same version number.
use Test::Dist::VersionSync; Test::Dist::VersionSync::ok_versions();
The most common use should be to add a module_versions.t file to your tests directory for a given distribution, with the following content:
#!perl -T use strict; use warnings; use Test::More; # Ensure a recent version of Test::Dist::VersionSync my $version_min = '1.0.1'; eval "use Test::Dist::VersionSync $version_min"; plan( skip_all => "Test::Dist::VersionSync $version_min required for testing module versions in the distribution." ) if $@; Test::Dist::VersionSync::ok_versions();
Verify that all the Perl modules in the distribution have the same version number.
# Default, use MANIFEST and MANIFEST.SKIP to find out what modules exist. ok_versions(); # Optional, specify a list of modules to check for identical versions. ok_versions( modules => [ 'Test::Module1', 'Test::Module2', 'Test::Module3', ], );
Import a test plan. This uses the regular Test::More plan options.
use Test::Dist::VersionSync tests => 4; ok_versions();
Test::Dist::VersionSync also detects if Test::More was already used with a test plan declared and will piggyback on it. For example:
use Test::More tests => 2; use Test::Dist::VersionSync; ok( 1, 'Some Test' ); ok_versions();
Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/Test-Dist-VersionSync/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
GitHub's request tracker
AnnoCPAN: Annotated CPAN documentation
<aubertg at cpan.org>.
Copyright 2012-2014 Guillaume Aubert.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/