[libconfig-model-dpkg-perl] 02/03: test: use variable to hold Testsuite object

dod at debian.org dod at debian.org
Tue Sep 5 13:44:41 UTC 2017


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

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit e3bc410e8a517cd47e6fc73af6614c1d69e42198
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Sep 5 15:33:33 2017 +0200

    test: use variable to hold Testsuite object
    
    This avoids repetitive calls to grab to fetch the configuration object
    that holds Testsuite value. This is often handy when running in a
    debugger: we only need to step through 'store' call instead of stepping
    though the "load" call (which is much more complicated than store)
---
 t/dpkg.t | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/dpkg.t b/t/dpkg.t
index 45ce92c..55043c6 100644
--- a/t/dpkg.t
+++ b/t/dpkg.t
@@ -104,9 +104,10 @@ warning_is {
     my $ts = $root->grab_value("control source Testsuite");
 } undef, 'check that undefined Testsuite does not warn for random maintainer ';
 
-foreach my $target (qw(dkms elpa go nodejs perl python r ruby)) {
+my $ts = $root->grab("control source Testsuite");
+foreach my $target (qw(elpa nodejs go dkms perl python r ruby)) {
     warning_is {
-        $root->load("control source Testsuite=autopkgtest-pkg-$target");
+        $ts->store("autopkgtest-pkg-$target");
     } undef, "check that Testsuite is accepted for autopkgtest-pkg-$target";
     $root->grab('control source Testsuite')->apply_fixes;
     is($root->grab_value("control source Testsuite"),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list