[libconfig-model-dpkg-perl] 03/03: test consecutive good and bad values for Testsuite

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 a418a167452f2c43f46d46ada5c66f6b91acf568
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Sep 5 15:42:28 2017 +0200

    test consecutive good and bad values for Testsuite
    
    The bad value are pif paf pouf, which are detected by the regexp /^p\w+f$/
    
    which also test the fix brought by Config::Model 2.107 (brought by Tincho)
---
 t/dpkg.t | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/t/dpkg.t b/t/dpkg.t
index 55043c6..ff0ec99 100644
--- a/t/dpkg.t
+++ b/t/dpkg.t
@@ -20,7 +20,7 @@ if ( $@ ) {
     plan skip_all => "AptPkg::Config is not installed";
 }
 elsif ( -r '/etc/debian_version' ) {
-    plan tests => 43;
+    plan tests => 38;
 }
 else {
     plan skip_all => "Not a Debian system";
@@ -105,13 +105,17 @@ warning_is {
 } undef, 'check that undefined Testsuite does not warn for random maintainer ';
 
 my $ts = $root->grab("control source Testsuite");
-foreach my $target (qw(elpa nodejs go dkms perl python r ruby)) {
-    warning_is {
-        $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"),
-        "autopkgtest-pkg-$target", 'check Testsuite value');
+foreach my $target (qw(elpa nodejs pif paf go dkms pouf perl python r ruby)) {
+    if ($target =~ /^p\w+f$/) {
+        warning_like {
+            $ts->store("autopkgtest-pkg-$target");
+        } qr/Unknown/, "check that Testsuite is not accepted for autopkgtest-pkg-$target";
+    }
+    else {
+        warning_is {
+            $ts->store("autopkgtest-pkg-$target");
+        } undef, "check that Testsuite is accepted for autopkgtest-pkg-$target";
+    }
 }
 
 warning_like {

-- 
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