[libconfig-model-dpkg-perl] 03/03: test pack_copyright for multi line debfmt data

dod at debian.org dod at debian.org
Wed Aug 23 19:04:44 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 07dbc7763149eacc73dc4d42e3fd38d83e42ce18
Author: Dominique Dumont <dod at debian.org>
Date:   Wed Aug 23 21:04:16 2017 +0200

    test pack_copyright for multi line debfmt data
---
 t/scanner/pack_copyright.t | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/t/scanner/pack_copyright.t b/t/scanner/pack_copyright.t
index 89e3c77..ad52df9 100644
--- a/t/scanner/pack_copyright.t
+++ b/t/scanner/pack_copyright.t
@@ -4,6 +4,7 @@ use warnings;
 use 5.010;
 
 use Test::More;   # see done_testing()
+use Test::Differences;
 
 require_ok( 'Dpkg::Copyright::Scanner' );
 
@@ -29,13 +30,27 @@ my @tests = (
     [
         '2005, Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) / 2005, Michael Schuerig (http://www.schuerig.de/michael/) / 2005, Jon Tirsen (http://www.tirsen.com)',
         "2005, Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)\n 2005, Michael Schuerig (http://www.schuerig.de/michael/)\n 2005, Jon Tirsen (http://www.tirsen.com)"
+    ],
+    [
+        '1998 Brian Bassett <brian at butterfly.ml.org>
+2002 Noel Koethe <noel at debian.org>
+2003-2010 Jonathan Oxer <jon at debian.org>
+2006-2010 Jose Luis Tallon <jltallon at adv-solutions.net>
+2010 Nick Leverton <nick at leverton.org>
+2011-2014 Dominique Dumont <dod at debian.org>',
+        '2011-2014, Dominique Dumont <dod at debian.org>
+ 2010, Nick Leverton <nick at leverton.org>
+ 2006-2010, Jose Luis Tallon <jltallon at adv-solutions.net>
+ 2003-2010, Jonathan Oxer <jon at debian.org>
+ 2002, Noel Koethe <noel at debian.org>
+ 1998, Brian Bassett <brian at butterfly.ml.org>',
     ]
 );
 
 foreach my $t (@tests) {
     my ($in,$expect) = @$t;
-    my $label = length $in > 50 ? substr($in,0,50).'...' : $in ;
-    is(Dpkg::Copyright::Scanner::__pack_copyright($in),$expect,"__pack_copyright '$label'");
+    my $label = length $in > 50 ? substr($in,0,30).'...' : $in ;
+    eq_or_diff(Dpkg::Copyright::Scanner::__pack_copyright($in),$expect,"__pack_copyright '$label'");
 }
 
 

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