r47989 - /trunk/libparse-debcontrol-perl/debian/patches/strict_parse.diff
azatoth-guest at users.alioth.debian.org
azatoth-guest at users.alioth.debian.org
Mon Nov 30 20:46:13 UTC 2009
Author: azatoth-guest
Date: Mon Nov 30 20:46:08 2009
New Revision: 47989
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=47989
Log:
enable Forwarded field
Modified:
trunk/libparse-debcontrol-perl/debian/patches/strict_parse.diff
Modified: trunk/libparse-debcontrol-perl/debian/patches/strict_parse.diff
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-debcontrol-perl/debian/patches/strict_parse.diff?rev=47989&op=diff
==============================================================================
--- trunk/libparse-debcontrol-perl/debian/patches/strict_parse.diff (original)
+++ trunk/libparse-debcontrol-perl/debian/patches/strict_parse.diff Mon Nov 30 20:46:08 2009
@@ -1,7 +1,7 @@
Index: libparse-debcontrol-perl/t/34strict.t
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libparse-debcontrol-perl/t/34strict.t 2009-11-30 20:52:30.000000000 +0100
++++ libparse-debcontrol-perl/t/34strict.t 2009-11-30 21:07:42.000000000 +0100
@@ -0,0 +1,47 @@
+#
+#===============================================================================
@@ -53,7 +53,7 @@
Index: libparse-debcontrol-perl/lib/Parse/DebControl/Error.pm
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libparse-debcontrol-perl/lib/Parse/DebControl/Error.pm 2009-11-30 20:52:30.000000000 +0100
++++ libparse-debcontrol-perl/lib/Parse/DebControl/Error.pm 2009-11-30 21:07:42.000000000 +0100
@@ -0,0 +1,75 @@
+use strict;
+use warnings;
@@ -133,19 +133,23 @@
Index: libparse-debcontrol-perl/lib/Parse/DebControl/Patch.pm
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libparse-debcontrol-perl/lib/Parse/DebControl/Patch.pm 2009-11-30 20:57:00.000000000 +0100
-@@ -0,0 +1,152 @@
++++ libparse-debcontrol-perl/lib/Parse/DebControl/Patch.pm 2009-11-30 21:36:16.000000000 +0100
+@@ -0,0 +1,156 @@
+package Parse::DebControl::Patch;
+use strict;
+use warnings;
+
+use base 'Parse::DebControl';
+
-+use constant {
-+ Forwared_Yes => 1,
-+ Forwared_No => 2,
-+ Forwared_NotNeeded => 3,
-+};
++use Exporter::Lite;
++
++
++our $Forwarded_Yes = 1,
++our $Forwarded_No = 2,
++our $Forwarded_NotNeeded = 3,
++
++our @EXPORT = qw($Forwared_Yes $Forwared_No $Forwared_NotNeeded);
++our @EXPORT_OK = qw($Forwared_Yes $Forwared_No $Forwared_NotNeeded);
+
+our $VERSION = '0.1';
+
@@ -273,14 +277,14 @@
+ }
+ if( exists $data->{'Forwarded'} ) {
+ if( $data->{'Forwarded'}->[0] eq 'no' ) {
-+ $data->{'Forwarded'} = Forwarded_No;
++ $data->{'Forwarded'} = $Forwarded_No;
+ } elsif( $data->{'Forwarded'}->[0] eq 'not-needed' ) {
-+ $data->{'Forwarded'} = Forwarded_NotNeeded;
++ $data->{'Forwarded'} = $Forwarded_NotNeeded;
+ } else {
-+ $data->{'Forwarded'} = Forwarded_Yes;
++ $data->{'Forwarded'} = $Forwarded_Yes;
+ }
+ } else {
-+ $data->{'Forwarded'} = Forwarded_Yes;
++ $data->{'Forwarded'} = $Forwarded_Yes;
+ }
+
+ return $data;
@@ -290,8 +294,8 @@
Index: libparse-debcontrol-perl/t/35patch.t
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libparse-debcontrol-perl/t/35patch.t 2009-11-30 20:56:47.000000000 +0100
-@@ -0,0 +1,93 @@
++++ libparse-debcontrol-perl/t/35patch.t 2009-11-30 21:45:02.000000000 +0100
+@@ -0,0 +1,76 @@
+#
+#===============================================================================
+#
@@ -312,7 +316,7 @@
+use strict;
+use warnings;
+
-+use Test::More tests => 25; # last test to print
++use Test::More tests => 22; # last test to print
+use Test::Exception;
+
+BEGIN {
@@ -320,25 +324,15 @@
+ use lib '../blib/lib', 'lib/', '..';
+}
+
-+sub declared ($) {
-+ use constant 1.01; # don't omit this!
-+ my $name = shift;
-+ $name =~ s/^::/main::/;
-+ my $pkg = caller;
-+ my $full_name = $name =~ /::/ ? $name : "${pkg}::$name";
-+ $constant::declared{$full_name};
-+}
-+
-+my $mod = "Parse::DebControl::Patch";
+my $pdc;
+my $data;
+
+#Object initialization - 2 tests
+
-+use_ok($mod);
++BEGIN { use_ok( 'Parse::DebControl::Patch' ) };
+ok($pdc = new Parse::DebControl::Patch(), "Parser object creation works fine");
+
-+$pdc = new Parse::DebControl::Patch(1);
++$pdc = new Parse::DebControl::Patch();
+
+#Parse file - 1 test
+ok($data = $pdc->parse_file( 'testfiles/patch1.diff' ), "Parsed patch ok");
@@ -374,21 +368,14 @@
+is( $data->{"Bug-Debian"}->[0], "http://bugs.debian.org/510219", "Single Bug-Debian field");
+ok( ! exists $data->{"Bug-Debian"}->[1], "No second Bug-Debian field");
+
-+TODO: {
-+ local $TODO = "Aint implemented yet";
-+
-+# Check if the Forwarded field is set and is set to true - 5 tests
++# Check if the Forwarded field is set and is set to true - 2 tests
+# Test file doesn't include a forwared field, so it should default to true
-+ok( declared( 'Parse::DebControl::Patch::Forwared_Yes' )," Parse::DebControl::Patch::Forwared_Yes is defined" );
-+ok( declared( 'Parse::DebControl::Patch::Forwared_No' ), "Parse::DebControl::Patch::Forwared_No is defined" );
-+ok( declared( 'Parse::DebControl::Patch::Forwared_NotNeeded' ), "Parse::DebControl::Patch::Forwared_Not_Needed is defined" );
-+ok( exists $data->{Forwarded}, "Exists Forwared field");
-+is( ref $data->{Forwared}, 'Parse::DebControl::Patch::Forwared_Yes', "Forwared is set to \"yes\"");
-+}
++ok( exists $data->{Forwarded}, "Exists Forwarded field");
++is( $data->{Forwarded}, $Parse::DebControl::Patch::Forwarded_Yes, "Forwarded is set to \"yes\"");
Index: libparse-debcontrol-perl/t/testfiles/patch1.diff
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libparse-debcontrol-perl/t/testfiles/patch1.diff 2009-11-30 20:52:30.000000000 +0100
++++ libparse-debcontrol-perl/t/testfiles/patch1.diff 2009-11-30 21:07:42.000000000 +0100
@@ -0,0 +1,27 @@
+From: Ulrich Drepper <drepper at redhat.com>
+Subject: Fix regex problems with some multi-bytes characters
More information about the Pkg-perl-cvs-commits
mailing list