~ubuntu-branches/ubuntu/utopic/libtest-html-content-perl/utopic

« back to all changes in this revision

Viewing changes to t/99-changes.t

  • Committer: Package Import Robot
  • Author(s): Dominic Hargreaves
  • Date: 2014-02-09 22:04:37 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140209220437-w2rahrtuzyxg6kvr
Tags: 0.09-1
* Switch to copyright-format 1.0
* Switch to debhelper compat to 8
* Update Standards-Version (no changes)
* New upstream release
  - new patch perl-5.14-stringification, integrated upstream 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!perl -w
 
2
use warnings;
 
3
use strict;
 
4
use File::Find;
 
5
use Test::More tests => 2;
 
6
 
 
7
=head1 PURPOSE
 
8
 
 
9
This test ensures that the Changes file
 
10
mentions the current version and that a
 
11
release date is mentioned as well
 
12
 
 
13
=cut
 
14
 
 
15
my $module = 'Test::HTML::Content';
 
16
 
 
17
(my $file = $module) =~ s!::!/!g;
 
18
require "$file.pm";
 
19
 
 
20
my $version = sprintf '%0.2f', $module->VERSION;
 
21
diag "Checking for version " . $version;
 
22
 
 
23
my $changes = do { local $/; open my $fh, 'Changes' or die $!; <$fh> };
 
24
 
 
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;