Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

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

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

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: t/content_contains.t busted with newest Test::LongString
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1601
Download (untitled) / with headers
text/plain 1.5k
Hi, The author of Test::LongString (which you are depending on) has recently released a new version which changes diagnostics output. You can see the change log here: "http://cpansearch.perl.org/src/RGARCIA/Test-LongString-0.12/Changes" Now when I try to "make test" I get the following in 't/content_contains.t': t/content_contains.t .... 2/5 # Failed test 'Handles not finding it' # at t/content_contains.t line 39. # STDERR is: # # Failed test 'Where is Mungo?' # # at t/content_contains.t line 38. # # searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>\x{0a} </h"... # # can't find: "Mungo" # # LCSS: "go" # # LCSS context: "ead>\x{0a} <body>\x{0a} <h1>Test Page</h1>\x{0a} <a href='go" # # not: # /#\s+Failed\ test.*?\n?.*?at\ t\/content_contains\.t line 38.*\n?/ # # # searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>\x{0a} </h"... # # # can't find: "Mungo" # # as expected This test failure is a false positive since it's due to a change in Test::LongString (added the LCSS and context stuff, and some other slight reformatting). I know you rightly might say the author of Test::LongString shouldn't make such an incompatible change, but I can also understand why he might think using his error messages this way is a bit out of scope. Anyway, until we can find a solution, either backward compatibility fixes on his part, or on some changes to this test, nobody will be able to install the module without force. I'm happy to help if we can coordinate what to do. Sincerely, John Napiorkowski (jjnapiork@cpan.org)
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
Content-Disposition: inline
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Message-ID: <20100131135548.GX4665 [...] belanna.comodo.priv.at>
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t8N2qprAjL+0GVly"
X-Face: -kg'V!M2hYTiiEt:oj$rToa+c^7N.t}]V^j}|%+]%3J&tOm^9mc^1-#9o=\8VJpV7b~nxIM!qu>r_:w\EtWQA01;$jp>,cgp9EWV:i9B]LCgiNn\jA=un9d-ZcRzyq~9vYUf*tx9B}de^fH5Q(d(_N"0WXs%Jh!~.*g.iC=bSTqL:/EE0Y~\g_QCvwS6=cv]$tB7z<Xh[Wxa.2d"m?]^f
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 06B5E4D8022 for <bug-Test-WWW-Mechanize [...] rt.cpan.org>; Sun, 31 Jan 2010 08:56:36 -0500 (EST)
Received: (qmail 454 invoked by uid 103); 31 Jan 2010 13:56:36 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 31 Jan 2010 13:56:36 -0000
Received: from colleen.colgarra.priv.at (HELO colleen.colgarra.priv.at) (82.150.197.85) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sun, 31 Jan 2010 05:56:01 -0800
Received: from chello212186032184.406.14.vie.surfer.at ([212.186.32.184] helo=belanna.comodo.priv.at) by colleen.colgarra.priv.at with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <gregoa [...] debian.org>) id 1NbaHF-0006Oj-Lj for bug-Test-WWW-Mechanize [...] rt.cpan.org; Sun, 31 Jan 2010 14:55:49 +0100
Received: from gregoa by belanna.comodo.priv.at with local (Exim 4.71) (envelope-from <gregoa [...] debian.org>) id 1NbaHE-0001ZY-8g for bug-Test-WWW-Mechanize [...] rt.cpan.org; Sun, 31 Jan 2010 14:55:48 +0100
Delivered-To: cpan-bug+Test-WWW-Mechanize [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #53637] t/content_contains.t busted with newest Test::LongString
User-Agent: Mutt/1.5.20 (2009-06-14)
Return-Path: <gregoa [...] debian.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Test-WWW-Mechanize [...] rt.cpan.org
Date: Sun, 31 Jan 2010 14:55:48 +0100
X-Spam-Level: *
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: gregor herrmann <gregoa [...] debian.org>
RT-Message-ID: <rt-3.8.HEAD-18076-1264946213-567.53637-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: multipart/mixed; boundary="ofekNuVaYCKmvJ0U"
Content-Disposition: inline
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 487
Download (untitled) / with headers
text/plain 487b
LCSS reporting can be turned off in Test::LongString with the new 0.13 release. Find attached a patch that uses this feature and makes t/content_contains.t pass again. Cheers, gregor, Debian Perl Group -- .''`. http://info.comodo.priv.at/ -- GPG Key IDs: 0x00F3CFE4, 0x8649AA06 : :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe `- NP: Der Junge mit der Gitarre: Du wie ich
Content-Type: text/x-diff; charset=us-ascii
content-disposition: attachment; filename="test-longstring.patch"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: us-ascii
Content-Length: 1338

Message body is not shown because sender requested not to inline it.

Content-Description: Digital signature
content-type: application/pgp-signature; name="signature.asc"
Content-Disposition: inline
Content-Length: 836
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-18076-1264946213-567.53637-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <20100131135548.GX4665 [...] belanna.comodo.priv.at> <rt-3.8.HEAD-18076-1264946213-567.53637-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1266199005-14813-149"
Message-ID: <rt-3.8.HEAD-14813-1266199005-216.53637-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
RT-Send-CC: gregoa [...] debian.org
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1314
Download (untitled) / with headers
text/plain 1.2k
On Sun Jan 31 08:56:53 2010, gregoa@debian.org wrote: Show quoted text
> LCSS reporting can be turned off in Test::LongString with the new > 0.13 release. > > Find attached a patch that uses this feature and makes > t/content_contains.t pass again. > > Cheers, > gregor, Debian Perl Group
Please *please* don't disable LCSS in Test::WWW::Mechanize. I'm the author of the original Test::LongString LCSS patch and I did it exactly because $mech->content_contains() was not giving enough debug output to work on. All we got was "Searched: <!DOCTYPE html foo bar..." and no context on the error itself, which was specially annoying for finding typos and tiny errors on both the HTML and the Test suite. Attached to this message is a patched version of t/content_contains.t that fixes the test, including the new information, and also updated Makefile.PL/META.yml files to include the new version of Test::LongString. For your convenience, I've also added a .patch file containing just the appropriate fixes to all the relevant files. Yes, this is really important to me :) Again, *please* keep LCSS information in the new versions of Test::WWW::Mechanize. The new output only shows when the test fails, which is precisely when the developer needs such debug information. Thanks again for your time and for such a helpful module.
Subject: enable-lcss.patch
MIME-Version: 1.0
Content-Type: text/x-diff; name="enable-lcss.patch"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="enable-lcss.patch"
Content-Transfer-Encoding: binary
Content-Length: 2010
Download enable-lcss.patch
text/x-diff 1.9k
diff -ur Test-WWW-Mechanize-1.24/Makefile.PL Test-WWW-Mechanize-1.25/Makefile.PL --- Test-WWW-Mechanize-1.24/Makefile.PL 2008-12-22 16:20:57.000000000 -0200 +++ Test-WWW-Mechanize-1.25/Makefile.PL 2010-02-14 23:37:53.869207309 -0200 @@ -13,7 +13,7 @@ 'HTTP::Server::Simple' => '0.35', 'HTTP::Server::Simple::CGI' => 0, 'Test::Builder::Tester' => '1.09', - 'Test::LongString' => '0.07', + 'Test::LongString' => '0.12', 'Test::More' => 0, 'URI::file' => 0, 'WWW::Mechanize' => '1.24', diff -ur Test-WWW-Mechanize-1.24/META.yml Test-WWW-Mechanize-1.25/META.yml --- Test-WWW-Mechanize-1.24/META.yml 2009-01-17 17:41:50.000000000 -0200 +++ Test-WWW-Mechanize-1.25/META.yml 2010-02-14 23:42:53.373210892 -0200 @@ -12,7 +12,7 @@ HTTP::Server::Simple: 0.35 HTTP::Server::Simple::CGI: 0 Test::Builder::Tester: 1.09 - Test::LongString: 0.07 + Test::LongString: 0.12 Test::More: 0 URI::file: 0 WWW::Mechanize: 1.24 Only in Test-WWW-Mechanize-1.25: pm_to_blib diff -ur Test-WWW-Mechanize-1.24/t/content_contains.t Test-WWW-Mechanize-1.25/t/content_contains.t --- Test-WWW-Mechanize-1.24/t/content_contains.t 2008-12-22 21:44:52.000000000 -0200 +++ Test-WWW-Mechanize-1.25/t/content_contains.t 2010-02-14 23:29:49.437204797 -0200 @@ -32,9 +32,11 @@ test_test( 'Finds the contains - default desc' ); test_out( 'not ok 1 - Where is Mungo?' ); -test_fail(+3); +test_fail(+5); test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>\x{0a} </h"...) ); test_diag(q( can't find: "Mungo") ); +test_diag(q( LCSS: "go")); +test_diag(q(LCSS context: "ead>\x{0a} <body>\x{0a} <h1>Test Page</h1>\x{0a} <a href='go")); $mech->content_contains( 'Mungo', 'Where is Mungo?' ); test_test( 'Handles not finding it' );
MIME-Version: 1.0
Subject: META.yml
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: application/octet-stream; name="META.yml"
Content-Disposition: inline; filename="META.yml"
Content-Transfer-Encoding: base64
Content-Length: 727
Download META.yml
text/x-yaml 727b
--- #YAML:1.0 name: Test-WWW-Mechanize version: 1.24 abstract: Testing-specific WWW::Mechanize subclass license: ~ author: - Andy Lester <andy@petdance.com> generated_by: ExtUtils::MakeMaker version 6.44 distribution_type: module requires: Carp::Assert::More: 0 HTTP::Server::Simple: 0.35 HTTP::Server::Simple::CGI: 0 Test::Builder::Tester: 1.09 Test::LongString: 0.12 Test::More: 0 URI::file: 0 WWW::Mechanize: 1.24 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.3.html version: 1.3
MIME-Version: 1.0
Subject: content_contains.t
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/troff; name="content_contains.t"
Content-Disposition: inline; filename="content_contains.t"
Content-Transfer-Encoding: binary
Content-Length: 1155
Download content_contains.t
text/x-perl 1.1k
#!perl -w use strict; use warnings; use Test::More tests => 5; use Test::Builder::Tester; BEGIN { use_ok( 'Test::WWW::Mechanize' ); } use lib 't'; use TestServer; my $server = TestServer->new; my $pid = $server->background; my $server_root = $server->root; my $mech=Test::WWW::Mechanize->new(); isa_ok($mech,'Test::WWW::Mechanize'); $mech->get( "$server_root/goodlinks.html" ); # test regex test_out( 'ok 1 - Does it say test page?' ); $mech->content_contains( 'Test Page', 'Does it say test page?' ); test_test( 'Finds the contains' ); # default desc test_out( 'ok 1 - Content contains "Test Page"' ); $mech->content_contains( 'Test Page'); test_test( 'Finds the contains - default desc' ); test_out( 'not ok 1 - Where is Mungo?' ); test_fail(+5); test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>\x{0a} </h"...) ); test_diag(q( can't find: "Mungo") ); test_diag(q( LCSS: "go")); test_diag(q(LCSS context: "ead>\x{0a} <body>\x{0a} <h1>Test Page</h1>\x{0a} <a href='go")); $mech->content_contains( 'Mungo', 'Where is Mungo?' ); test_test( 'Handles not finding it' ); $server->stop;
Subject: Makefile.PL
MIME-Version: 1.0
Content-Type: text/x-perl; name="Makefile.PL"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="Makefile.PL"
Content-Transfer-Encoding: binary
Content-Length: 1358
Download Makefile.PL
text/x-perl 1.3k
use strict; use warnings; use ExtUtils::MakeMaker; my $parms = { NAME => 'Test::WWW::Mechanize', AUTHOR => 'Andy Lester <andy@petdance.com>', VERSION_FROM => 'Mechanize.pm', ABSTRACT_FROM => 'Mechanize.pm', PL_FILES => {}, PREREQ_PM => { 'Carp::Assert::More' => 0, 'HTTP::Server::Simple' => '0.35', 'HTTP::Server::Simple::CGI' => 0, 'Test::Builder::Tester' => '1.09', 'Test::LongString' => '0.12', 'Test::More' => 0, 'URI::file' => 0, 'WWW::Mechanize' => '1.24', }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Test-WWW-Mechanize-*' }, }; if ( $ExtUtils::MakeMaker::VERSION eq '6.36' ) { $parms->{EXTRA_META} = <<EOF; resources: homepage: http://code.google.com/p/www-mechanize/ bugtracker: http://code.google.com/p/www-mechanize/issues/list EOF } WriteMakefile( %{$parms} ); sub MY::postamble { return <<'MAKE_FRAG'; .PHONY: critic tags critic: perlcritic -1 -q -profile perlcriticrc Mechanize.pm t/ tags: ctags -f tags --recurse --totals \ --exclude=blib \ --exclude=.svn \ --exclude='*~' \ --languages=Perl --langmap=Perl:+.t \ MAKE_FRAG }
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-14813-1266199005-216.53637-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <20100131135548.GX4665 [...] belanna.comodo.priv.at> <rt-3.8.HEAD-18076-1264946213-567.53637-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-14813-1266199005-216.53637-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14812-1267018925-1911.53637-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 357
Download (untitled) / with headers
text/plain 357b
On 2010-02-15 01:56:45, GARU wrote: Show quoted text
> Attached to this message is a patched version of t/content_contains.t > that fixes the test, including the new information, and also updated > Makefile.PL/META.yml files to include the new version of > Test::LongString.
I have tested this patch with perl-5.10.1 and perl-5.11.5 on FreeBSD 8.0 and it works for me. Tom
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-14812-1267018925-1911.53637-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <20100131135548.GX4665 [...] belanna.comodo.priv.at> <rt-3.8.HEAD-18076-1264946213-567.53637-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-14813-1266199005-216.53637-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-14812-1267018925-1911.53637-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14831-1267064770-542.53637-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1087
On Wed Feb 24 08:42:05 2010, TOMHUKINS wrote: Show quoted text
> On 2010-02-15 01:56:45, GARU wrote:
> > Attached to this message is a patched version of t/content_contains.t > > that fixes the test, including the new information, and also updated > > Makefile.PL/META.yml files to include the new version of > > Test::LongString.
> > I have tested this patch with perl-5.10.1 and perl-5.11.5 on FreeBSD 8.0 > and it works for me. > > Tom
Hey, FYI, it seems that the T:WWW:Mechanized group doesn't really use RT to manage bugs, they are over at Google Code. I started this RT before I knew that. There's a conversation going on about this problem over at: http://code.google.com/p/www-mechanize/issues/detail?id=143 Where I think you should bring your patches and ideas. I'm not so fluent with the guts of this application, just I am hoping to resolve this problem in a way that allows many important dependent distributions to install without force and also not bust a lot of the darkpan. Since I guess you understand this more hopefully you can enlighten us :) Thanks, John Napiorkowski
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-26544-1271134790-94.53637-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 20
This has been fixed.


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.