Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add (author) test for having a release date in the Changes file
- Loading branch information
Max Maischein
committed
Nov 11, 2010
1 parent
d34cf7d
commit 184e334
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ MANIFEST.skip | |
README | ||
README.mkdn | ||
t/00-use.t | ||
t/99-changes.t | ||
t/99-manifest.t | ||
t/99-pod.t | ||
t/99-todo.t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!perl -w | ||
use warnings; | ||
use strict; | ||
use File::Find; | ||
use Test::More tests => 2; | ||
|
||
=head1 PURPOSE | ||
This test ensures that the Changes file | ||
mentions the current version and that a | ||
release date is mentioned as well | ||
=cut | ||
|
||
my $module = 'WWW::Mechanize::Firefox'; | ||
|
||
(my $file = $module) =~ s!::!/!g; | ||
require "$file.pm"; | ||
|
||
my $version = sprintf '%0.2f', $module->VERSION; | ||
diag "Checking for version " . $version; | ||
|
||
my $changes = do { local $/; open my $fh, 'Changes' or die $!; <$fh> }; | ||
|
||
ok $changes =~ /^(.*$version.*)$/m, "We find version $version"; | ||
my $changes_line = $1; | ||
ok $changes_line =~ /$version\s+20\d{6}/, "We find a release date on the same line" | ||
or diag $changes_line; |