AI-Chat

 view release on metacpan or  search on metacpan

t/version.t  view on Meta::CPAN

#!/usr/bin/perl
use warnings;
use strict;
use Test::More;

use AI::Chat;

unless ( $ENV{RELEASE_TESTING} ) {
    plan( skip_all => "Author tests not required for installation" );
}

my $code_version = $AI::Chat::VERSION;
ok($code_version, 'version set');

ok(open(my $source, '<', $INC{'AI/Chat.pm'}), 'open the source');

my $in_version;
while (<$source>) {
    if (/^=head1 VERSION/) {
        $in_version = 1;
    } elsif (/^=head1/) {
        undef $in_version;
    }
    if ($in_version && /^Version ([0-9.]+)/) {
        is($code_version, $1, 'pod version');
    }
}

done_testing();



( run in 0.230 second using v1.01-cache-2.11-cpan-4d50c553e7e )