[libconfig-model-dpkg-perl] 01/05: added tests for Scanner::__pack_copyright
dod at debian.org
dod at debian.org
Wed Jan 14 20:07:13 UTC 2015
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 e37d24023329ced3f7ff3c5d0ef01dffcec46a71
Author: Dominique Dumont <dod at debian.org>
Date: Wed Jan 14 18:44:17 2015 +0100
added tests for Scanner::__pack_copyright
---
t/scanner/pack_copyright.t | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/t/scanner/pack_copyright.t b/t/scanner/pack_copyright.t
new file mode 100644
index 0000000..06c0542
--- /dev/null
+++ b/t/scanner/pack_copyright.t
@@ -0,0 +1,33 @@
+# -*- cperl -*-
+use strict;
+use warnings;
+use 5.010;
+
+use Test::More; # see done_testing()
+
+require_ok( 'Dpkg::Copyright::Scanner' );
+
+# __pack_copyright tests
+
+my @tests = (
+ [
+ '2002-2006 Charles Kerr <charles at rebelbase.com>',
+ '2002-2006, Charles Kerr <charles at rebelbase.com>'
+ ],
+ [
+ '2011 Heinrich Müller <henmull at src.gnome.org> / 2002-2006 Charles Kerr <charles at rebelbase.com>',
+ "2011, Heinrich Müller <henmull\@src.gnome.org>\n 2002-2006, Charles Kerr <charles\@rebelbase.com>"
+ ],
+ [
+ '2002-2006 Charles Kerr <charles at rebelbase.com> / 2002, 2003, 2004, 2005, 2007, 2008, 2010 Free Software / 2011 Heinrich Müller <henmull at src.gnome.org> / 2002 vjt (irssi project)',
+ "2011, Heinrich Müller <henmull\@src.gnome.org>\n 2002-2006, Charles Kerr <charles\@rebelbase.com>\n 2002-2005, 2007, 2008, 2010, Free Software\n 2002, vjt (irssi project)"
+ ]
+);
+
+foreach my $t (@tests) {
+ my ($in,$expect) = @$t;
+ is(Dpkg::Copyright::Scanner::__pack_copyright($in),$expect,"__pack_copyright '$in'");
+}
+
+
+done_testing();
--
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