tag 636520 + patch thanks On Wed, 03 Aug 2011 20:32:27 +0100, Dominic Hargreaves wrote:
> Source: libtest-html-content-perl > Version: 0.08-1 > Severity: important > User: [email protected] > Usertags: perl-5.14-transition I'm attaching a patch for this issue. Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key ID: 0x8649AA06 : :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe `- NP: trio infernal: mercy mercy
--- libtest-html-content-perl-0.08.orig/t/08-errors.comment.t
+++ libtest-html-content-perl-0.08/t/08-errors.comment.t
@@ -13,6 +13,10 @@
plan skip_all => "Test::Builder::Tester required for testing error messages";
}
+# perldelta 5.14
+# Accept both old and new-style stringification
+my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? "^" : "-xism";
+
sub run {
# Test that each exported function fails as documented
@@ -48,7 +52,7 @@
#} else {
test_diag("Saw '<!-- hidden massage -->'",
"Saw '<!-- hidden massage -->'",
- "Expected no comment like '(?-xism:hidden m.ssage)'");
+ "Expected no comment like '(?$modifiers:hidden m.ssage)'");
#};
no_comment("<!-- hidden massage --><!-- hidden massage -->",
qr"hidden m.ssage","Comment failure (two comments that shouldn't exist do)");
@@ -61,7 +65,7 @@
#} else {
test_diag("Saw '<!-- hidden massage -->'",
"Saw '<!-- hidden massage -->'",
- "Expected exactly 3 comments like '(?-xism:hidden m.ssage)'");
+ "Expected exactly 3 comments like '(?$modifiers:hidden m.ssage)'");
#};
comment_count("<!-- hidden massage --><!-- hidden massage -->",
qr"hidden m.ssage",3,"Comment failure (too few comments)");
@@ -74,7 +78,7 @@
#} else {
test_diag("Saw '<!-- hidden massage -->'",
"Saw '<!-- hidden massage -->'",
- "Expected exactly 1 comments like '(?-xism:hidden m.ssage)'");
+ "Expected exactly 1 comments like '(?$modifiers:hidden m.ssage)'");
#};
comment_count("<!-- hidden massage --><!-- hidden massage -->",
qr"hidden m.ssage",1,"Comment failure (too few comments)");
only in patch2:
unchanged:
--- libtest-html-content-perl-0.08.orig/t/07-errors.link.t
+++ libtest-html-content-perl-0.08/t/07-errors.link.t
@@ -14,6 +14,10 @@
}
};
+# perldelta 5.14
+# Accept both old and new-style stringification
+my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? "^" : "-xism";
+
sub run {
# Test that each exported function fails as documented
test_out("not ok 1 - Link failure (no links)");
@@ -51,13 +55,13 @@
test_fail(+14);
if ($Test::HTML::Content::can_xpath eq 'XML::LibXML') {
test_diag("Expected to find no <a> tag(s) matching",
- " href = (?-xism:.)",
+ " href = (?$modifiers:.)",
"Got",
' <a href="http://www.foo.com">foo</a>',
' <a href="index.html">Home</a>');
} else {
test_diag("Expected to find no <a> tag(s) matching",
- " href = (?-xism:.)",
+ " href = (?$modifiers:.)",
"Got",
" <a href='http://www.foo.com'>",
" <a href='index.html'>");
@@ -70,13 +74,13 @@
test_fail(+14);
if ($Test::HTML::Content::can_xpath eq 'XML::LibXML') {
test_diag("Expected to find exactly 3 <a> tag(s) matching",
- " href = (?-xism:.)",
+ " href = (?$modifiers:.)",
"Got",
' <a href="http://www.foo.com">foo</a>',
' <a href="index.html">Home</a>');
} else {
test_diag("Expected to find exactly 3 <a> tag(s) matching",
- " href = (?-xism:.)",
+ " href = (?$modifiers:.)",
"Got",
" <a href='http://www.foo.com'>",
" <a href='index.html'>");
@@ -88,7 +92,7 @@
test_fail(+18);
if ($Test::HTML::Content::can_xpath eq 'XML::LibXML') {
test_diag("Expected to find exactly 3 <a> tag(s) matching",
- " href = (?-xism:.)",
+ " href = (?$modifiers:.)",
"Got",
' <a href="http://www.bar.com">bar</a>',
' <a href="http://www.dot.com">.</a>',
@@ -96,7 +100,7 @@
' <a href="index.html">Home</a>');
} else {
test_diag("Expected to find exactly 3 <a> tag(s) matching",
- " href = (?-xism:.)",
+ " href = (?$modifiers:.)",
"Got",
" <a href='http://www.bar.com'>",
" <a href='http://www.dot.com'>",
signature.asc
Description: Digital signature

