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=127a183fd1aa7b40efbfd1630759593948708224 commit 127a183fd1aa7b40efbfd1630759593948708224 Author: Guillem Jover <[email protected]> AuthorDate: Sun Nov 21 17:38:55 2021 +0100 test: Refactor parse_ctrl() from parse_dsc() --- scripts/t/Dpkg_Control.t | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/t/Dpkg_Control.t b/scripts/t/Dpkg_Control.t index 057cb21b6..a359d6924 100644 --- a/scripts/t/Dpkg_Control.t +++ b/scripts/t/Dpkg_Control.t @@ -28,16 +28,22 @@ BEGIN { my $datadir = test_get_data_path(); -sub parse_dsc { - my $path = shift; +sub parse_ctrl { + my ($type, $path) = @_; - my $dsc = Dpkg::Control->new(type => CTRL_PKG_SRC); + my $ctrl = Dpkg::Control->new(type => $type); eval { - $dsc->load($path); + $ctrl->load($path); 1; } or return; - return $dsc; + return $ctrl; +} + +sub parse_dsc { + my $path = shift; + + return parse_ctrl(CTRL_PKG_SRC, $path); } my $c = Dpkg::Control::Info->new("$datadir/control-1"); -- Dpkg.Org's dpkg

