[dh-make-perl] 02/03: add tests for previous change

gregor herrmann gregoa at debian.org
Thu Apr 13 19:40:15 UTC 2017


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

gregoa pushed a commit to branch master
in repository dh-make-perl.

commit b7133a61fbd2c3f0e7f79067041e454fe11b2ded
Author: gregor herrmann <gregoa at debian.org>
Date:   Thu Apr 13 21:34:47 2017 +0200

    add tests for previous change
    
    Gbp-Dch: Ignore
---
 t/Control.t | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/t/Control.t b/t/Control.t
index 3927be3..b01ab87 100644
--- a/t/Control.t
+++ b/t/Control.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 22;
+use Test::More;
 use Test::Exception;
 use Test::Differences;
 
@@ -111,3 +111,17 @@ Depends: libfoo-perl (>= 0.44839848),
  libtreshchotka-moo (>= 5.6),
  libmoo-more-java (>= 9.6544)
 EOF
+
+# canonical / case-insensitive field names/accessors
+lives_ok { $s = Debian::Control::Stanza::Source->new({'Vcs_Git' => 'git://example.org'}) } 'Source constructur with Vcs_Git';
+can_ok($s, qw(Vcs_Git));
+ok($s->Vcs_Git eq 'git://example.org', 'Vcs_Git returns correct value');
+throws_ok { $s->vCs_GiT } qr/Can't locate object method "vCs_GiT" via package "Debian::Control::Stanza::Source"/, 'No method vCs_GiT';
+
+lives_ok { $s = Debian::Control::Stanza::Source->new({'vCs-GiT' => 'git://example.net'}) } 'Source constructur with vCs-GiT';
+can_ok($s, qw(Vcs_Git));
+ok($s->Vcs_Git eq 'git://example.net', 'Vcs_Git returns correct value');
+throws_ok { $s->vCs_GiT } qr/Can't locate object method "vCs_GiT" via package "Debian::Control::Stanza::Source"/, 'No method vCs_GiT';
+
+
+done_testing;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



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