[libtemplate-declare-perl] 01/02: Add a patch to fix test failures with HTML::Lint 2.26.

gregor herrmann gregoa at debian.org
Mon Nov 20 22:57:11 UTC 2017


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

gregoa pushed a commit to branch master
in repository libtemplate-declare-perl.

commit f51e1dfdbcf6e6bcd57e6aaddc6e0b7467779445
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Nov 20 23:56:05 2017 +0100

    Add a patch to fix test failures with HTML::Lint 2.26.
    
    Closes: #882264
---
 debian/patches/html-lint.patch | 92 ++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 2 files changed, 93 insertions(+)

diff --git a/debian/patches/html-lint.patch b/debian/patches/html-lint.patch
new file mode 100644
index 0000000..caeeefe
--- /dev/null
+++ b/debian/patches/html-lint.patch
@@ -0,0 +1,92 @@
+Description: fix or workaround test failures with newer HTML::Lint
+ - t/utils.t: add missing $lint->eof() and filter out "doc-tag-required" errors
+ - t/utf8.t: skip lint checks, HTML::Lint has Unicode problems:
+   https://github.com/petdance/html-lint/issues/11
+Origin: vendor
+Bug: https://rt.cpan.org/Ticket/Display.html?id=119731
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=119731
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2017-11-20
+
+--- a/t/utf8.t
++++ b/t/utf8.t
+@@ -24,14 +24,14 @@
+ 
+ 1;
+ 
+-use Test::More tests => 12;
++use Test::More tests => 6;
+ require "t/utils.pl";
+ 
+ {
+     my $simple = (show('simple_outs'));
+     ok($simple =~ m{^\s*$str\s*$}s);
+     # diag ($simple);
+-    ok_lint($simple);
++    #ok_lint($simple);
+ }
+ Template::Declare->buffer->clear;
+ 
+@@ -39,21 +39,21 @@
+     my $simple = (show('double_outs'));
+     ok($simple =~ m{^\s*$str\s*$str\s*$}s);
+     # diag ($simple);
+-    ok_lint($simple);
++    #ok_lint($simple);
+ }
+ Template::Declare->buffer->clear;
+ 
+ {
+     my $simple = (show('tag_outs'));
+     ok($simple =~ m{^\s*<p>\s*$str\s*</p>\s*$}s);
+-    ok_lint($simple, 1);
++    #ok_lint($simple, 1);
+ }
+ Template::Declare->buffer->clear;
+ 
+ {
+     my $simple = (show('double_tag_outs'));
+     ok($simple =~ m{^\s*<p>\s*$str\s*</p>\s*<p>\s*$str\s*</p>\s*$}s);
+-    ok_lint($simple, 1);
++    #ok_lint($simple, 1);
+ }
+ Template::Declare->buffer->clear;
+ 
+@@ -61,7 +61,7 @@
+     my $simple = (show('attr'));
+     ok($simple =~ m{^\s*<p\s+title="$str"\s*></p>\s*$}s);
+     # diag ($simple);
+-    ok_lint($simple);
++    #ok_lint($simple);
+ }
+ Template::Declare->buffer->clear;
+ 
+@@ -69,7 +69,7 @@
+     my $simple = (show('attr_with_escape'));
+     ok($simple =~ m{^\s*<p\s+title="<$str>"\s*></p>\s*$}s);
+     #diag ($simple);
+-    ok_lint($simple);
++    #ok_lint($simple);
+ }
+ Template::Declare->buffer->clear;
+ 
+--- a/t/utils.pl
++++ b/t/utils.pl
+@@ -15,11 +15,13 @@
+         do {
+             local $SIG{__WARN__} = sub {}; # STFU HTML::Lint!
+             $lint->parse($html);
++            $lint->eof();
+         };
+-        # Collect the errors, ignore the invalid character errors when requested.
+-        my @errors = $ignore_chars
+-            ? grep { $_->errcode ne 'text-use-entity' } $lint->errors
+-            : $lint->errors;
++        # Collect the errors, ignore the doc-level errors, and invalid character errors when requested.
++        my @errors = grep { $_->errcode ne 'doc-tag-required' } $lint->errors;
++        @errors = $ignore_chars
++            ? grep { $_->errcode ne 'text-use-entity' } @errors
++            : @errors;
+         is( @errors, 0, "Lint checked clean" );
+         foreach my $error ( @errors ) {
+             diag( $error->as_string );
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5c249dc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+html-lint.patch

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



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