Skip Menu |

This queue is for tickets about the HTML-WikiConverter CPAN distribution.

Report information
The Basics
Id: 69098
Status: open
Priority: 0/
Queue: HTML-WikiConverter

People
Owner: Nobody in particular
Requestors: dan.bolser [...] gmail.com
Cc: pdurbin [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 0.68
Fixed in: (no value)



Subject: t/01-wikiconverter.t .. 1/53 request for <http://diberri.dyndns.org/wikipedia/html2wiki-old/test.html> failed at t/01-wikiconverter.t line 162
cpan[3]> install HTML::WikiConverter Running install for module 'HTML::WikiConverter' Running make for D/DI/DIBERRI/HTML-WikiConverter-0.68.tar.gz Has already been unwrapped into directory /home/dan- local/.cpan/build/HTML-WikiConverter-0.68-HaHSgJ Has already been made Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.t ........... 1/1 # Testing HTML::WikiConverter 0.68, Perl 5.008008, /usr/bin/perl t/00-load.t ........... ok t/01-normalizer.t ..... ok t/01-wikiconverter.t .. 1/53 request for <http://diberri.dyndns.org/wikipedia/html2wiki-old/test.html> failed at t/01-wikiconverter.t line 162 # Looks like you planned 53 tests but ran 35. # Looks like your test exited with 22 just after 35. t/01-wikiconverter.t .. Dubious, test returned 22 (wstat 5632, 0x1600) Failed 18/53 subtests t/boilerplate.t ....... ok t/pod-coverage.t ...... ok t/pod.t ............... ok Test Summary Report ------------------- t/01-wikiconverter.t (Wstat: 5632 Tests: 35 Failed: 0) Non-zero exit status: 22 Parse errors: Bad plan. You planned 53 tests but ran 35. Files=6, Tests=53, 2 wallclock secs ( 0.05 usr 0.01 sys + 0.68 cusr 0.05 csys = 0.79 CPU) Result: FAIL Failed 1/6 test programs. 0/53 subtests failed. make: *** [test_dynamic] Error 255 DIBERRI/HTML-WikiConverter-0.68.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports DIBERRI/HTML-WikiConverter-0.68.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: DIBERRI/HTML-WikiConverter-0.68.tar.gz : make_test NO
I included a patch which removes UserAgent tests which try to download pages from an offline URL. I hope the original author can review it and include changes. On Mon Jun 27 05:16:02 2011, dan.bolser wrote: Show quoted text
> cpan[3]> install HTML::WikiConverter > Running install for module 'HTML::WikiConverter' > Running make for D/DI/DIBERRI/HTML-WikiConverter-0.68.tar.gz > Has already been unwrapped into directory /home/dan- > local/.cpan/build/HTML-WikiConverter-0.68-HaHSgJ > Has already been made > Running make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00-load.t ........... 1/1 # Testing HTML::WikiConverter 0.68, Perl > 5.008008, /usr/bin/perl > t/00-load.t ........... ok > t/01-normalizer.t ..... ok > t/01-wikiconverter.t .. 1/53 request for > <http://diberri.dyndns.org/wikipedia/html2wiki-old/test.html> failed at > t/01-wikiconverter.t line 162 > # Looks like you planned 53 tests but ran 35. > # Looks like your test exited with 22 just after 35. > t/01-wikiconverter.t .. Dubious, test returned 22 (wstat 5632, 0x1600) > Failed 18/53 subtests > t/boilerplate.t ....... ok > t/pod-coverage.t ...... ok > t/pod.t ............... ok > > Test Summary Report > ------------------- > t/01-wikiconverter.t (Wstat: 5632 Tests: 35 Failed: 0) > Non-zero exit status: 22 > Parse errors: Bad plan. You planned 53 tests but ran 35. > Files=6, Tests=53, 2 wallclock secs ( 0.05 usr 0.01 sys + 0.68 cusr > 0.05 csys = 0.79 CPU) > Result: FAIL > Failed 1/6 test programs. 0/53 subtests failed. > make: *** [test_dynamic] Error 255 > DIBERRI/HTML-WikiConverter-0.68.tar.gz > /usr/bin/make test -- NOT OK > //hint// to see the cpan-testers results for installing this module, > try: > reports DIBERRI/HTML-WikiConverter-0.68.tar.gz > Running make install > make test had returned bad status, won't install without force > Failed during this command: > DIBERRI/HTML-WikiConverter-0.68.tar.gz : make_test NO
Subject: no-useragent-tests.patch
--- HTML-WikiConverter-0.68/t/01-wikiconverter.t 2009-03-08 03:24:42.000000000 +0100 +++ HTML-WikiConverter-0.68-new/t/01-wikiconverter.t 2011-12-11 14:41:32.779254868 +0100 @@ -71,10 +71,9 @@ package main; -use Test::More tests => 53; +use Test::More tests => 49; use HTML::WikiConverter; -my $have_lwp = eval "use LWP::UserAgent; 1"; my $have_query_param = eval "use URI::QueryParam; 1"; my $wc = new HTML::WikiConverter( @@ -155,21 +154,6 @@ is( $wc4->html2wiki( html => '&lt;', escape_entities => 1 ), '&lt;', "escape entities" ); is( $wc4->html2wiki( html => '&lt;' ), '&lt;', "escape_entities is enabled by default" ); -SKIP: { - skip "LWP::UserAgent required for testing how content is fetched from URIs" => 4 unless $have_lwp; - skip "Couldn't fetch test website http://www.perl.org. Perhaps you don't have internet access?" => 4 unless LWP::UserAgent->new->get('http://www.perl.org')->is_success; - - is( $wc4->html2wiki( uri => 'http://diberri.dyndns.org/wikipedia/html2wiki-old/test.html', strip_tags => ['head'] ), '**test**', 'fetch uri, no ua' ); - is( $wc4->user_agent->agent, $wc4->__default_ua_string, 'using default ua' ); - - my $ua_agent = 'html2wiki-test/0.5x'; - my $ua = new LWP::UserAgent( agent => $ua_agent ); - $wc4->user_agent($ua); - - is( $wc4->html2wiki( uri => 'http://diberri.dyndns.org/wikipedia/html2wiki-old/test.html', strip_tags => ['head'] ), '**test**', 'fetch uri w/ ua' ); - is( $wc4->user_agent->agent, $ua_agent, 'using user-specified ua' ); -}; - eval { $wc4->html2wiki( url => '...' ) }; ok( $@ =~ /not a valid argument/, 'url not a valid argument to html2wiki()' );