[pkg-perl-tools] 02/08: Save patch name in Debian::PkgPerl::Patch

Alex Muntada alexm-guest at moszumanska.debian.org
Sat Dec 3 18:11:42 UTC 2016


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

alexm-guest pushed a commit to branch master
in repository pkg-perl-tools.

commit c395c7777ecb7b15ff7c00df422d69f719924cab
Author: Alex Muntada <alexm at alexm.org>
Date:   Sat Dec 3 04:39:41 2016 +0100

    Save patch name in Debian::PkgPerl::Patch
---
 lib/Debian/PkgPerl/Patch.pm | 2 ++
 t/patch.t                   | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/Debian/PkgPerl/Patch.pm b/lib/Debian/PkgPerl/Patch.pm
index 1326b27..b6182d7 100644
--- a/lib/Debian/PkgPerl/Patch.pm
+++ b/lib/Debian/PkgPerl/Patch.pm
@@ -38,6 +38,8 @@ sub retrieve_patch_info {
     my $patch     = $self->{patch};
     my $opt_force = $self->{force};
 
+    $patch_info{patch} = $patch;
+
     open( my $in, "<", $patch );
     my $line_no = 1;
     while ( $line_no <= 10 ) {
diff --git a/t/patch.t b/t/patch.t
index 6d61168..fbe6e22 100644
--- a/t/patch.t
+++ b/t/patch.t
@@ -20,10 +20,11 @@ my $patch = "$ENV{DPT_PACKAGES}/pkg-perl-tools/t/dummy.txt.patch";
 my $bug = new_ok( 'Debian::PkgPerl::Patch', [ patch => $patch ] );
 
 my %info = $bug->retrieve_patch_info();
+ok( exists $info{patch}, "retrieve patch name" );
+is( $info{patch}, $patch, "verify patch name" );
 ok( exists $info{Subject}, "retrieve patch info" );
 like( $info{Subject}, qr/\w+/, "subject in patch is not empty" );
-note("Subject: $info{Subject}");
 like( $info{From}, qr/\w+/, "from in patch is not empty" );
-note("From: $info{From}");
 
+note("$info{patch} ($info{Subject}) by $info{From}");
 done_testing();

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



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