This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=0a385c8651506fa4fe4a1e6436e2946d6b9c50d0 commit 0a385c8651506fa4fe4a1e6436e2946d6b9c50d0 Author: Guillem Jover <[email protected]> AuthorDate: Sat Sep 20 17:23:59 2025 +0200 test: Move use_ok() calls immediately after use imports Add comments for module relationships or code sections that were implied by the previous placement of use_ok() calls. --- scripts/t/Dpkg_Deps.t | 5 +++-- scripts/t/Dpkg_Shlibs.t | 14 +++++++++----- scripts/t/Dpkg_Shlibs_Cppfilt.t | 4 ++-- scripts/t/Dpkg_Substvars.t | 5 +++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/scripts/t/Dpkg_Deps.t b/scripts/t/Dpkg_Deps.t index 54338e9e8..f4fa5d025 100644 --- a/scripts/t/Dpkg_Deps.t +++ b/scripts/t/Dpkg_Deps.t @@ -20,11 +20,12 @@ use Test::More tests => 84; use Dpkg::Arch qw(get_host_arch); use Dpkg::Version; +use_ok('Dpkg::Deps'); + +# Needed by Dpkg::Deps functions. $ENV{DEB_BUILD_ARCH} = 'amd64'; $ENV{DEB_HOST_ARCH} = 'amd64'; -use_ok('Dpkg::Deps'); - is(deps_concat(), '', 'Concatenate an empty list'); is(deps_concat(undef), '', 'Concatenate list with undef'); is(deps_concat(''), '', 'Concatenate an empty string'); diff --git a/scripts/t/Dpkg_Shlibs.t b/scripts/t/Dpkg_Shlibs.t index 325868e5c..a6e0e7e3f 100644 --- a/scripts/t/Dpkg_Shlibs.t +++ b/scripts/t/Dpkg_Shlibs.t @@ -22,15 +22,19 @@ use Config; use Cwd; use IPC::Cmd qw(can_run); +use_ok('Dpkg::Shlibs'); +use_ok('Dpkg::Shlibs::Objdump'); +use_ok('Dpkg::Shlibs::SymbolFile'); +use_ok('Dpkg::Shlibs::Symbol'); + if (! defined $Config{bin_ELF} || $Config{bin_ELF} ne 'define') { plan skip_all => 'only ELF is currently supported'; } +# Needed by Dpkg::Shlibs functions. $ENV{DEB_BUILD_ARCH} = 'amd64'; $ENV{DEB_HOST_ARCH} = 'amd64'; -use_ok('Dpkg::Shlibs'); - my $tmp; my @tmp; my %tmp; @@ -83,7 +87,8 @@ is_deeply(\@librarypaths, [ qw( ) ], 'parsed library paths'); -use_ok('Dpkg::Shlibs::Objdump'); + +## Test Dpkg::Shlibs::Objdump module. my $obj; @@ -168,8 +173,7 @@ is(scalar @syms, 2231, 'defined && dynamic'); is(scalar @syms, 9, 'undefined && dynamic'); -use_ok('Dpkg::Shlibs::SymbolFile'); -use_ok('Dpkg::Shlibs::Symbol'); +## Testing Dpkg::Shlibs::Symbol and Dpkg::Shlibs::SymbolFile modules. my $sym_file = Dpkg::Shlibs::SymbolFile->new( filename => "$datadir/symbol_file.tmp", diff --git a/scripts/t/Dpkg_Shlibs_Cppfilt.t b/scripts/t/Dpkg_Shlibs_Cppfilt.t index 0fd4f3101..7c6e03a10 100644 --- a/scripts/t/Dpkg_Shlibs_Cppfilt.t +++ b/scripts/t/Dpkg_Shlibs_Cppfilt.t @@ -20,14 +20,14 @@ use Test::Dpkg qw(:needs); use Config; +use_ok('Dpkg::Shlibs::Cppfilt'); + test_needs_command('c++filt'); if (! defined $Config{bin_ELF} || $Config{bin_ELF} ne 'define') { plan skip_all => 'only ELF is currently supported'; } -use_ok('Dpkg::Shlibs::Cppfilt'); - # Simple C++ demangling tests is(cppfilt_demangle_cpp('_ZNSt10istrstreamC1EPKcl'), 'std::istrstream::istrstream(char const*, long)', diff --git a/scripts/t/Dpkg_Substvars.t b/scripts/t/Dpkg_Substvars.t index 563f3014d..a39003da6 100644 --- a/scripts/t/Dpkg_Substvars.t +++ b/scripts/t/Dpkg_Substvars.t @@ -21,11 +21,12 @@ use Test::Dpkg qw(:paths); use Dpkg (); use Dpkg::Arch qw(get_host_arch); +use_ok('Dpkg::Substvars'); + +# Needed by Dpkg::Substvars functions. $ENV{DEB_BUILD_ARCH} = 'amd64'; $ENV{DEB_HOST_ARCH} = 'amd64'; -use_ok('Dpkg::Substvars'); - my $datadir = test_get_data_path(); my $output; -- Dpkg.Org's dpkg

