diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 12:53:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 12:53:53 +0000 |
commit | 90169463f86997737ed5b9c0ea2b311cd3b056b7 (patch) | |
tree | 281a0f8d9850ea58cf2a3ddb8bf087fb52520925 /t/Dh_Lib/control-parsing.t | |
parent | Initial commit. (diff) | |
download | debhelper-90169463f86997737ed5b9c0ea2b311cd3b056b7.tar.xz debhelper-90169463f86997737ed5b9c0ea2b311cd3b056b7.zip |
Adding upstream version 13.15.3.upstream/13.15.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/Dh_Lib/control-parsing.t')
-rwxr-xr-x | t/Dh_Lib/control-parsing.t | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/t/Dh_Lib/control-parsing.t b/t/Dh_Lib/control-parsing.t new file mode 100755 index 0000000..0658256 --- /dev/null +++ b/t/Dh_Lib/control-parsing.t @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Test::More; + +use Cwd qw(abs_path); +use File::Basename qw(dirname); + +BEGIN { + my $dir = dirname(abs_path(__FILE__)); + unshift(@INC, dirname($dir)); + chdir($dir) or error("chdir($dir) failed: $!"); +}; + +use Test::DH; + +use Debian::Debhelper::Dh_Lib qw(!dirname); + +plan(tests => 10); + +is_deeply([getpackages()], [qw(foo-any foo-all)], 'packages list correct and in order'); +is_deeply([getpackages('both')], [qw(foo-any foo-all)], 'packages list correct and in order'); +is_deeply([getpackages('arch')], [qw(foo-any)], 'arch:linux-any'); +is_deeply([getpackages('indep')], [qw(foo-all)], 'arch:all'); + + +is(package_section('foo-any'), 'devel', 'binary section'); +is(package_section('foo-all'), 'misc', 'binary section (inherit from source)'); + + +is(package_declared_arch('foo-any'), 'linux-any', 'binary architecture (linux-any'); +is(package_declared_arch('foo-all'), 'all', 'binary architecture (all)'); + +ok(! package_is_arch_all('foo-any'), 'foo-any is not arch:all'); +ok(package_is_arch_all('foo-all'), 'foo-all is arch:all'); |