Subject: | Test suite failure with HTML-Parser > 3.56 |
HTML-Parser (the distribution containing HTML::LinkExtor) versions later
than 3.56 treat IFRAME content as plain text and hence don't find links
within it. This causes test suite failures in HTML-SimpleLinkExtor such as:
# Failed test 'Found the right number of links'
# at t/absolute_links.t line 28.
# got: '2'
# expected: '11'
# Looks like you failed 1 test of 8.
t/absolute_links.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests
There are many examples of this on the CPAN testers site.
The attached patch close the IFRAMEs in the example files immediately
and allows the test suite to pass.
Subject: | perl-HTML-SimpleLinkExtor-1.22-iframe.patch |
--- HTML-SimpleLinkExtor-1.22/t/example2.html 2008-09-08 02:06:07.000000000 +0100
+++ HTML-SimpleLinkExtor-1.22/t/example2.html 2009-05-13 22:37:29.000000000 +0100
@@ -17,6 +17,7 @@
<iframe class="banner" src="/Images/banners/apress/apress.html" height=68 width="468"
scrolling="no" marginwidth="5" marginheight="10" frameborder="0" align="right">
+</iframe>
<ul>
<li><a href="relative.html">A relative link</a>
--- HTML-SimpleLinkExtor-1.22/t/example.html 2008-09-08 02:06:07.000000000 +0100
+++ HTML-SimpleLinkExtor-1.22/t/example.html 2009-05-13 22:41:41.000000000 +0100
@@ -27,6 +27,7 @@
<!-- 1 IFRAME -->
<iframe class="banner" src="/Images/banners/apress/apress.html" height=68 width="468"
scrolling="no" marginwidth="5" marginheight="10" frameborder="0" align="right">
+</iframe>
<ul>
<!-- 8 A links -->