This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository dh-make-perl.

commit a058c4c891dbcad7ea5107d5cc4dfeadf1ebdf7c
Author: gregor herrmann <gre...@debian.org>
Date:   Tue Jan 3 02:44:52 2017 +0100

    t/Dep.t: add tests for architecture and build profile restrictions
    
    in preparation for implementing #850000
    
    Gbp-Dch: Ignore
---
 t/Dep.t | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/t/Dep.t b/t/Dep.t
index 4f7c457..658ab12 100755
--- a/t/Dep.t
+++ b/t/Dep.t
@@ -66,6 +66,30 @@ $d = new_ok( 'Debian::Dependency', [ 'foo | bar' ] );
 isa_ok( $d->alternatives, 'ARRAY' );
 is( "$d", "foo | bar", "alternative dependency stringifies" );
 
+# architectures and build-profiles
+my $abp = eval { Debian::Dependency->new('libfoo [amd64]') };
+ok( !$@, 'dep with 1 architecture parsed' );
+$abp = eval { Debian::Dependency->new('libfoo [amd64 i396]') };
+ok( !$@, 'dep with 2 architectures parsed' );
+$abp = eval { Debian::Dependency->new('libfoo (>= 42) [amd64]') };
+ok( !$@, 'dep with version and 1 architecture parsed' );
+$abp = eval { Debian::Dependency->new('libfoo (>= 42) [amd64 i396]') };
+ok( !$@, 'dep with version and 2 architectures parsed' );
+$abp = eval { Debian::Dependency->new('libfoo <stage1>') };
+ok( !$@, 'dep with 1 build profile parsed' );
+$abp = eval { Debian::Dependency->new('libfoo <stage1> <stage2>') };
+ok( !$@, 'dep with 2 separate build profiles parsed' );
+$abp = eval { Debian::Dependency->new('libfoo <stage1 cross>') };
+ok( !$@, 'dep with 1 build profile with 2 terms parsed' );
+$abp = eval { Debian::Dependency->new('libfoo <!stage1> <!cross>') };
+ok( !$@, 'dep with 2 separate negated build profiles parsed' );
+$abp = eval { Debian::Dependency->new('libfoo (>= 23) <stage1>') };
+ok( !$@, 'dep with version and build profile parsed' );
+$abp = eval { Debian::Dependency->new('libfoo [amd64] <stage1>') };
+ok( !$@, 'dep with architecture and build profile parsed' );
+$abp = eval { Debian::Dependency->new('libfoo (>= 23) [amd64] <stage1>') };
+ok( !$@, 'dep with version and architecture and build profile parsed' );
+
 sub sat( $ $ $ ) {
     my( $dep, $test, $expected ) = @_;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to