Skip to content

Commit

Permalink
Merge pull request #25 from paultcochrane/pr/check-3dp-version-numbers
Browse files Browse the repository at this point in the history
Check that version numbers can be more than 2dp
  • Loading branch information
briandfoy committed Oct 29, 2017
2 parents 38d62c2 + 2da9e5e commit d91e87d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/dist_version.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,23 @@ subtest 'formatting dev version' => sub {
'Development version stays in there'
);

$mock = bless { remote_file => 'Foo-1.125_039.tar.gz' }, $class;
is(
$mock->dist_version, '1.125_039',
'Development version handles more than two decimal places'
);
};

subtest 'formatting release version' => sub {
my $mock = bless { remote_file => 'Foo-3.45.tar.gz' }, $class;
is( $mock->dist_version, '3.45',
"Without development version it's fine"
);

$mock = bless { remote_file => 'Foo-1.001.tar.gz' }, $class;
is( $mock->dist_version, '1.001',
"Three decimal places are retained in version number"
);
};

subtest 'formatting integer version' => sub {
Expand Down

0 comments on commit d91e87d

Please sign in to comment.