diff options
Diffstat (limited to 't/scripts/Lintian/Relation/06-build-profiles.t')
-rwxr-xr-x | t/scripts/Lintian/Relation/06-build-profiles.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/scripts/Lintian/Relation/06-build-profiles.t b/t/scripts/Lintian/Relation/06-build-profiles.t new file mode 100755 index 0000000..824572d --- /dev/null +++ b/t/scripts/Lintian/Relation/06-build-profiles.t @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Test::More tests => 3; + +use Lintian::Relation; + +my $relation = Lintian::Relation->new->load_norestriction( + 'pkgA (<= 1.0) <stage1 nocheck> <nobiarch>, pkgB (<< 1.0) <!nodoc>'); + +ok($relation->satisfies('pkgA:any'), + 'Satisfies restrictions <stage1 nocheck> <nobiarch>'); +ok($relation->satisfies('pkgB:any'), 'Satisfies restriction <!nodoc>'); + +my $rel = Lintian::Relation->new->load('pkgC <foo bar> <baz>'); + +is($rel->to_string, 'pkgC <foo bar> <baz>', 'Reconstitute pkgC'); + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et |