[libconfig-model-dpkg-perl] 01/04: test alternate dep corner case
dod at debian.org
dod at debian.org
Fri Aug 23 16:19:00 UTC 2013
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.
commit d919ad509281e6aed7ffaba1aa04643141a7733a
Author: Dominique Dumont <dod at debian.org>
Date: Fri Aug 23 12:50:01 2013 +0200
test alternate dep corner case
---
t/dependency-check.t | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/t/dependency-check.t b/t/dependency-check.t
index ceb4740..dba80e7 100644
--- a/t/dependency-check.t
+++ b/t/dependency-check.t
@@ -6,6 +6,7 @@ BEGIN {
no warnings 'once';
my $sep = chr(28);
%Config::Model::Dpkg::Dependency::cache = (
+ 'libarchive-extract-perl' => 'jessie 0.68-1 sid 0.68-1',
'perl-modules' => 'lenny 5.10.0-19lenny3 squeeze 5.10.1-17 sid 5.10.1-17 experimental 5.12.0-2 experimental 5.12.2-2',
'perl' => 'lenny 5.10.0-19lenny3 squeeze 5.10.1-17 sid 5.10.1-17 experimental 5.12.0-2 experimental 5.12.2-2',
'debhelper' => 'etch 5.0.42 backports/etch 7.0.15~bpo40+2 lenny 7.0.15 backports/lenny 8.0.0~bpo50+2 squeeze 8.0.0 wheezy 8.1.2 sid 8.1.2',
@@ -182,15 +183,27 @@ $dep_value->check_versioned_dep( $ok_cb, ['perl','>=','5.6.0'] ) ;
# $dep_value->store('libcpan-meta-perl') ;
# exit ;
-my $dep = [ ['libcpan-meta-perl']] ;
-my $ret = $dep_value->check_depend_chain (0, $dep);
-is($ret, 0, "check dual life of libcpan-meta-perl") ;
-
-# exit ;
+my @chain_tests = (
+ # tag name for display, test data, expected result: 1 (good dep) or expected fixed structure
+ 'libcpan-meta-perl' => [ ['libcpan-meta-perl']] => [['libcpan-meta-perl'],[qw/perl >= 5.13.10/]],
+ 'libmodule-build-perl' => [ [qw/perl >= 5.10/], ['libmodule-build-perl']] => [['perl'],[]],
+ # test Debian #719225
+ 'libarchive-extract-perl' => [ [qw/libarchive-extract-perl >= 0.68/] , [qw/perl >= 5.17.9/]] => [ ['libarchive-extract-perl'] , [qw/perl >= 5.17.9/]],
+ 'libarchive-extract-perl' => [ ['libarchive-extract-perl'] , [qw/perl >= 5.17.9/]] => 1,
+);
-my $dep2 = [ [qw/perl >= 5.10/], 'libmodule-build-perl'] ;
-my $ret2 = $dep_value->check_depend_chain (0, $dep);
-is($ret, 0, "check dual life of perl | libmodule-build-perl") ;
+while (@chain_tests) {
+ my ($tag,$dep,$expect) = splice @chain_tests,0,3;
+ my $ret = $dep_value->check_depend_chain (1, $dep);
+ if (ref $expect) {
+ # $dep was not correct
+ is($ret, 0, "check dual life of $tag") ;
+ eq_or_diff ($dep,$expect,"check fixed value of dual life $tag");
+ }
+ else {
+ is($ret, $expect, "check dual life of $tag") ;
+ }
+}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list