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: 18282
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: book [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.18
Fixed in: (no value)



The t/live/get.t test script dies if Test::LongString is not installed. The attached patch adds SKIP block around the two tests that require Test::LongString.
Subject: t_live_get.patch
Index: t/live/get.t =================================================================== --- t/live/get.t (révision 3706) +++ t/live/get.t (copie de travail) @@ -3,8 +3,10 @@ use warnings; use strict; use Test::More tests => 26; -use Test::LongString; +eval { require Test::LongString; }; +my $no_TLS = $@; + BEGIN { use_ok( 'WWW::Mechanize' ); } @@ -34,15 +36,24 @@ is( $agent->uri, 'http://www.google.com/help/basics.html', "Got relative OK" ); ok( $agent->is_html, "Basics page is HTML" ); is( $agent->title, "Google Help : Basics of Search", "Title matches" ); -like_string( $agent->content, qr/Essentials of Google Search/, "Got the right page" ); +SKIP: { + skip "Test::LongString required to test against long strings", 1 if $no_TLS; + like_string( $agent->content, qr/Essentials of Google Search/, "Got the right page" ); +} + ok( $agent->get( './refinesearch.html' )->is_success, 'Got the "refine search" page' ); is( $agent->uri, 'http://www.google.com/help/refinesearch.html', "Got relative OK" ); ok( $agent->is_html, "Refine Search page is HTML" ); is( $agent->title, "Google Help : Advanced Search" ); -like_string( $agent->content, qr/Advanced Search Made Easy/, "Got the right page" ); SKIP: { + skip "Test::LongString required to test against long strings", 1 + if $no_TLS; + like_string( $agent->content, qr/Advanced Search Made Easy/, "Got the right page"); +} + +SKIP: { eval "use Test::Memory::Cycle"; skip "Test::Memory::Cycle not installed", 1 if $@;
The live directory has been deleted. BUT, that also means Test::LongString is no longer needed, so I'm removing that requirement. Thanks!