[libcpan-meta-check-perl] 01/06: Swap conflicts test, underscore versions broke it
Jonas Smedegaard
js at alioth.debian.org
Fri Aug 9 16:32:10 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libcpan-meta-check-perl.
commit 71eb3105cbd17ef6c42e924da5bce69f55ac4530
Author: Leon Timmermans <fawaka at gmail.com>
Date: Wed Jul 31 13:52:33 2013 +0200
Swap conflicts test, underscore versions broke it
For $VERSION's with an underscore in them, Module::Metadata may detect a
version that isn't quite identical to the one returned by
Module->VERSION. Since that's a realistic issue for Test::More but not
for Test::Deep, I've switched them around. This is still somewhat
fragile though.
---
Changes | 1 +
t/10-basics.t | 11 +++++------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Changes b/Changes
index 7083cdf..3234dd7 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Revision history for CPAN-Meta-Check
{{$NEXT}}
+ Swap conflicts test, as underscore versions broke it
0.006 2013-07-27 00:24:21 Europe/Amsterdam
Fixed bad dereference during conflicts checking
diff --git a/t/10-basics.t b/t/10-basics.t
index d34dbaf..60c5319 100644
--- a/t/10-basics.t
+++ b/t/10-basics.t
@@ -23,9 +23,8 @@ my %prereq_struct = (
},
conflicts => {
'CPAN::Meta' => '<= 100.0', # check should fail
- 'Test::More' => '== ' . Test::More->VERSION, # check should fail
- 'Test::Deep' => '<= 0.01', # check should pass (up to 0.01 is bad)
-
+ 'Test::Deep' => '== ' . Test::Deep->VERSION, # check should fail
+ 'Test::More' => '<= 0.01', # check should pass (up to 0.01 is bad)
},
},
build => {
@@ -54,9 +53,9 @@ cmp_deeply(check_requirements($pre_rec, 'recommends'), {
my $pre_con = $meta->effective_prereqs->requirements_for('runtime', 'conflicts');
cmp_deeply([ sort +$pre_con->required_modules ], [ qw/CPAN::Meta Test::Deep Test::More/ ], 'The right conflicts are present');
cmp_deeply(check_requirements($pre_con, 'conflicts'), {
- 'CPAN::Meta' => "Installed version ($CPAN::Meta::VERSION) of CPAN::Meta is in range '<= 100.0'",
- 'Test::More' => "Installed version ($Test::More::VERSION) of Test::More is in range '== $Test::More::VERSION'",
- 'Test::Deep' => undef,
+ 'CPAN::Meta' => sprintf("Installed version (%.6f) of CPAN::Meta is in range '<= 100.0'", $CPAN::Meta::VERSION),
+ 'Test::More' => undef,
+ 'Test::Deep' => sprintf("Installed version (%.3f) of Test::Deep is in range '== $Test::Deep::VERSION'", $Test::Deep::VERSION),
}, 'Conflicts give the right errors');
done_testing();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcpan-meta-check-perl.git
More information about the Pkg-perl-cvs-commits
mailing list