Control: tag -1 + confirmed patch

On Sat, 01 Oct 2016 10:43:40 +0200, Lucas Nussbaum wrote:

> Relevant part (hopefully):
> > BEGIN failed--compilation aborted at t/utf8.t line 12.
> > # Looks like your test exited with 2 before it could output anything.
> > t/utf8.t .............. 
> > Dubious, test returned 2 (wstat 512, 0x200)
> > Failed 4/4 subtests 
> > t/write_file_win32.t .. ok
> > 
> > Test Summary Report
> > -------------------
> > t/utf8.t            (Wstat: 512 Tests: 0 Failed: 0)
> >   Non-zero exit status: 2
> >   Parse errors: Bad plan.  You planned 4 tests but ran 0.
> > Files=29, Tests=296,  3 wallclock secs ( 0.08 usr  0.02 sys +  1.04 cusr  
> > 0.14 csys =  1.28 CPU)
> > Result: FAIL
> > Failed 1/29 test programs. 0/296 subtests failed.
> > Makefile:823: recipe for target 'test_dynamic' failed

The relevant line was exactly one line before the quoted part :)

You tried to plan twice at t/utf8.t line 10.
BEGIN failed--compilation aborted at t/utf8.t line 12.
# Looks like your test exited with 2 before it could output anything.
t/utf8.t .............. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/4 subtests 

The problem seems to be that t/utf8.t (created in
debian/patches/01-binmode) has:

use Test::More tests => 4;
[..]
BEGIN {
   plan skip_all => "Newer Perl doesn't like sysread with utf8 binmode"
           if $] >= 5.024000;
}


After removing the test count from the use statement and adding a
plan later, this works. Alternatively done_testing() should work as
well.


Patch attached, which implements the former option.


Cheers,
gregor

-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Featuring The Dubliners, The Fureys And Davey Arthur Etc.: Spanish 
Lady, Paddy Reilly
diff -Nru libfile-slurp-perl-9999.19/debian/changelog libfile-slurp-perl-9999.19/debian/changelog
--- libfile-slurp-perl-9999.19/debian/changelog	2016-07-24 13:57:07.000000000 +0200
+++ libfile-slurp-perl-9999.19/debian/changelog	2016-10-02 17:06:17.000000000 +0200
@@ -1,3 +1,12 @@
+libfile-slurp-perl (9999.19-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix "FTBFS: Tests failures": update debian/patches/01-binmode to 'plan'
+    only once.
+    (Closes: #839302)
+
+ -- gregor herrmann <gre...@debian.org>  Sun, 02 Oct 2016 17:06:17 +0200
+
 libfile-slurp-perl (9999.19-5) unstable; urgency=medium
 
   * updated tests and docs to indicate that the combo of binmode :utf8
diff -Nru libfile-slurp-perl-9999.19/debian/patches/01-binmode libfile-slurp-perl-9999.19/debian/patches/01-binmode
--- libfile-slurp-perl-9999.19/debian/patches/01-binmode	2016-07-24 13:55:57.000000000 +0200
+++ libfile-slurp-perl-9999.19/debian/patches/01-binmode	2016-10-02 17:06:17.000000000 +0200
@@ -30,9 +30,9 @@
 +Arabic: ڐڡڠڟڞ
 --- /dev/null
 +++ b/t/utf8.t
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,46 @@
 +#!/usr/bin/perl
-+use Test::More tests => 4;
++use Test::More;
 +use strict; 
 +use File::Slurp;
 +use Encode qw/encode_utf8/;
@@ -43,6 +43,7 @@
 +	plan skip_all => "Newer Perl doesn't like sysread with utf8 binmode"
 +			if $] >= 5.024000;
 +}
++plan tests => 4;
 +
 +my $digest = 'e30ffef9b0c5623bc1ddd1ba73302f14';
 +

Attachment: signature.asc
Description: Digital Signature

Reply via email to