Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 16498
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: waltman [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.16
Fixed in: (no value)



Subject: Failed tests in live/back and local/overload
Download (untitled) / with headers
text/plain 1.1k
I'm getting multiple errors running "make test" on version 1.16 of W:M. I'm running perl 5.8.7 on debian testing. Here are the snippets that are failing: t/live/back.............ok 3/32 # Failed test 'Followed OK' t/live/back.............NOK 4# in t/live/back.t at line 20. t/live/back.............ok 28/32# Looks like you failed 1 test of 32. t/live/back.............dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 4 Failed 1/32 tests, 96.88% okay t/local/overload........ok 1/11# Started http://localhost:33172/ Use of uninitialized value in pattern match (m//) at t/local/overload.t line 69, <$server> line 1. # Failed test 'Standard mech chokes on bogus HTML' # in t/local/overload.t at line 69. # undef # doesn't match '(?i-xsm:bad.*select)' t/local/overload........ok 5/11# Looks like you failed 1 test of 11. t/local/overload........dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 4 Failed 1/11 tests, 90.91% okay
From: LM
Download (untitled) / with headers
text/plain 249b
[WALTMAN - Wed Dec 14 21:08:31 2005]: Show quoted text
> I'm getting multiple errors running "make test" on version 1.16 of > W:M. I'm running perl 5.8.7 on debian testing.
Same here, WWW::Mechanize 1.16 on Debian Testing. Is there a simple fix for this? -LM
From: LM
Download (untitled) / with headers
text/plain 437b
Actually, it's included in Debian testing: apt-get install libwww-mechanize-perl solved the problem. Sorry for 'bugging'. -LM [guest - Sun Dec 18 18:51:37 2005]: Show quoted text
> [WALTMAN - Wed Dec 14 21:08:31 2005]: >
> > I'm getting multiple errors running "make test" on version 1.16 of > > W:M. I'm running perl 5.8.7 on debian testing.
> > Same here, WWW::Mechanize 1.16 on Debian Testing. Is there a simple fix > for this? > > -LM
Download (untitled) / with headers
text/plain 836b
I guess I should have addded that while I'm running Debian testing, I'm having this problem with a version of Perl that I built from source. So it doesn't help me that there's a prebuilt debian package. Please reopen this bug. Also, since I originally opened it, why wasn't I contacted when it was closed? Walt [guest - Sun Dec 18 21:37:46 2005]: Show quoted text
> Actually, it's included in Debian testing: > > apt-get install libwww-mechanize-perl > > solved the problem. > > Sorry for 'bugging'. > > -LM > > [guest - Sun Dec 18 18:51:37 2005]: >
> > [WALTMAN - Wed Dec 14 21:08:31 2005]: > >
> > > I'm getting multiple errors running "make test" on version 1.16 of > > > W:M. I'm running perl 5.8.7 on debian testing.
> > > > Same here, WWW::Mechanize 1.16 on Debian Testing. Is there a simple fix > > for this? > > > > -LM
>
Download (untitled) / with headers
text/plain 307b
I sent a patch to Andy two days ago (which he applied) which fixes t/live/back.t. The problem with that test was that the second link was https:// instead of http://. Also fixed two tests that can fail if someone has a "search" domain in their resolv.conf tied to a domain that allows wildcard addressing.
Download mech-1.16.patch
text/x-diff 1.3k
diff -ur WWW-Mechanize-1.16.orig/t/autocheck.t WWW-Mechanize-1.16/t/autocheck.t --- WWW-Mechanize-1.16.orig/t/autocheck.t 2005-04-12 13:45:04.000000000 -0500 +++ WWW-Mechanize-1.16/t/autocheck.t 2006-01-11 20:59:15.000000000 -0600 @@ -4,7 +4,7 @@ use strict; use Test::More; -use constant NONEXISTENT => "http://sdflkjsdflkjs34.xx-nonexistent"; +use constant NONEXISTENT => "http://sdflkjsdflkjs34.xx-nonexistent."; BEGIN { eval "use Test::Exception"; diff -ur WWW-Mechanize-1.16.orig/t/live/back.t WWW-Mechanize-1.16/t/live/back.t --- WWW-Mechanize-1.16.orig/t/live/back.t 2005-08-30 16:53:22.000000000 -0500 +++ WWW-Mechanize-1.16/t/live/back.t 2006-01-11 21:08:03.000000000 -0600 @@ -16,7 +16,7 @@ my $first_base = $mech->base; my $title = $mech->title; -$mech->follow_link( n=>2 ); +$mech->follow_link( n=>2, url_regex => qr(http://) ); ok( $mech->success, 'Followed OK' ); $mech->back(); diff -ur WWW-Mechanize-1.16.orig/t/local/failure.t WWW-Mechanize-1.16/t/local/failure.t --- WWW-Mechanize-1.16.orig/t/local/failure.t 2005-04-12 13:45:03.000000000 -0500 +++ WWW-Mechanize-1.16/t/local/failure.t 2006-01-11 21:00:03.000000000 -0600 @@ -34,7 +34,7 @@ } BAD_PAGE: { - my $badurl = "http://sdlfkjsdlfjks.blofgorongotron.xx-only-testing"; + my $badurl = "http://sdlfkjsdlfjks.blofgorongotron.xx-only-testing."; $mech->get( $badurl ); ok( !$mech->success, 'Failed the fetch' );
From: grellir [...] gmail.com
Download (untitled) / with headers
text/plain 978b
I was installing WWW::Mechanize just now and had the same problem with t/live/back.t. The explanation was clear, the test was trying to follow the second link on google.com's page, but the point is when you have a gmail account (like I do) three extra links are added at the top of google's page (Personalized Home, etc.), leaving the second link a https link which fails the test. After some code examination I added the url_regex attribute $mech->follow_link( n=>3, url_regex => qr(http://)); and the test ran safely. Thanks for a great package! It totally rocks! Grétar Hreggviðsson grellir()gmail!com On Fri Jan 13 10:25:00 2006, PETEK wrote: Show quoted text
> I sent a patch to Andy two days ago (which he applied) which fixes > t/live/back.t. The problem with that test was that the second link was > https:// instead of http://. Also fixed two tests that can fail if > someone has a "search" domain in their resolv.conf tied to a domain that > allows wildcard addressing.
Fixed in 1.18.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.