5
use Test::More tests => 2;
9
This test ensures that the Changes file
10
mentions the current version and that a
11
release date is mentioned as well
15
my $module = 'Test::HTML::Content';
17
(my $file = $module) =~ s!::!/!g;
20
my $version = sprintf '%0.2f', $module->VERSION;
21
diag "Checking for version " . $version;
23
my $changes = do { local $/; open my $fh, 'Changes' or die $!; <$fh> };
25
ok $changes =~ /^(.*$version.*)$/m, "We find version $version";
26
my $changes_line = $1;
27
ok $changes_line =~ /$version\s+20\d{6}/, "We find a release date on the same line"
28
or diag $changes_line;