[starlet] 01/05: Add patch to make test work with older and newer versions of Plack.

gregor herrmann gregoa at debian.org
Tue Jun 23 15:21:18 UTC 2015


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

gregoa pushed a commit to branch master
in repository starlet.

commit befcafc3d186968d797a641265dc568e1ffa9ff4
Author: gregor herrmann <gregoa at debian.org>
Date:   Tue Jun 23 17:16:50 2015 +0200

    Add patch to make test work with older and newer versions of Plack.
    
    Closes: #789669
---
 debian/patches/plack-jpg.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 2 files changed, 41 insertions(+)

diff --git a/debian/patches/plack-jpg.patch b/debian/patches/plack-jpg.patch
new file mode 100644
index 0000000..fa321ed
--- /dev/null
+++ b/debian/patches/plack-jpg.patch
@@ -0,0 +1,40 @@
+Description: baybridge.jpg was resized in 1.0035
+ check for old and new size/md5sum
+Origin: vendor
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=105006
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=105006
+Bug-Debian: https://bugs.debian.org/#789669
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2015-06-23
+
+--- a/t/08chunked_req.t
++++ b/t/08chunked_req.t
+@@ -1,5 +1,6 @@
+ use strict;
+ use Test::TCP;
++use Plack;
+ use Plack::Test;
+ use File::ShareDir;
+ use HTTP::Request;
+@@ -35,8 +36,19 @@
+ 
+     my $res = $cb->($req);
+ 
+-    is $res->header('X-Content-Length'), 79838;
+-    is Digest::MD5::md5_hex($res->content), '983726ae0e4ce5081bef5fb2b7216950';
++    # baybridge.jpg was resized in 1.0035
++    my ($imgsize, $imgmd5);
++    diag ("Testing with baybridge.jpg from Plack $Plack::VERSION");
++    if ($Plack::VERSION >= 1.0035) {
++        $imgsize = 14750;
++        $imgmd5 = '70546a79c7abb9c497ca91730a0686e4';
++    } else {
++        $imgsize = 79838;
++        $imgmd5 = '983726ae0e4ce5081bef5fb2b7216950';
++    }
++
++    is $res->header('X-Content-Length'), $imgsize;
++    is Digest::MD5::md5_hex($res->content), $imgmd5;
+ };
+ 
+ done_testing;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cdc5c9a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+plack-jpg.patch

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



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