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

People
Owner: Nobody in particular
Requestors: tokuhiro [...] mfac.jp
Cc:
AdminCc:

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

Attachments
TestWWWMechanize-base.diff



Return-Path: <andy [...] petdance.com>
X-Original-To: bug-test-www-mechanize [...] rt.cpan.org
Delivered-To: cpan-bug+test-www-mechanize [...] diesel.bestpractical.com
Received: from la.mx.develooper.com (ss1.fabel.dk [63.251.223.179]) by diesel.bestpractical.com (Postfix) with SMTP id 2410C4D80A1 for <bug-test-www-mechanize [...] rt.cpan.org>; Mon, 5 Sep 2005 01:48:03 -0400 (EDT)
Received: (qmail 4917 invoked by alias); 5 Sep 2005 05:47:54 -0000
X-Spam-Check-BY: la.mx.develooper.com
Received-SPF: pass (x1.develooper.com: domain of andy [...] petdance.com designates 68.164.161.90 as permitted sender)
Received: from mungo.petdance.com (HELO mungo.petdance.com) (68.164.161.90) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 04 Sep 2005 22:47:47 -0700
Received: from [192.168.0.5] (mook.petdance.com [192.168.0.5]) by mungo.petdance.com (Postfix) with ESMTP id 8BD8C24F864 for <bug-test-www-mechanize [...] rt.cpan.org>; Mon, 5 Sep 2005 00:47:42 -0500 (CDT)
MIME-Version: 1.0 (Apple Message framework v622)
Content-Type: multipart/mixed; boundary=Apple-Mail-1--584311221
Resent-Date: Mon, 5 Sep 2005 00:47:40 -0500
Message-ID: <f852fd5547b09d432616da6d2cff6469 [...] mfac.jp>
Resent-To: bug-test-www-mechanize [...] rt.cpan.org
Resent-Message-ID: <20050905121731.17B4.TOKUHIRO [...] mfac.jp>
From: MATSUNO Tokuhiro <tokuhiro [...] mfac.jp>
Subject: base_(is|like|unlike) patch of Test::WWW::Mechanize
Resent-From: Andy Lester <andy [...] petdance.com>
Date: Mon, 05 Sep 2005 12:35:13 +0900
To: Andy Lester <andy [...] petdance.com>
X-Mailer: Apple Mail (2.622)
Content-Length: 0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-2022-JP; format=flowed
X-RT-Original-Encoding: iso-8859-1
Content-Length: 2147
Nice to meet you, Mr. Andy Lister. I'm MATSUNO Tokuhiro, Japanese Perl Monger. I'm a user of Test::WWW::Mechanize. In the web application, if authorizer failed then redirect. I want to test redirect url. I want to three methods in Test::WWW::Mechanize. * base_is * base_like * base_unlike I wrote the patch. I want to merge to Test::WWW::Mechanize. Thanks, tokuhirom. --- Mechanize.pm.orig Mon Sep 5 12:25:46 2005 +++ Mechanize.pm Mon Sep 5 11:58:19 2005 @@ -10,7 +10,7 @@ =cut -our $VERSION = '1.06'; +our $VERSION = '1.07'; =head1 SYNOPSIS @@ -109,6 +109,57 @@ } return $ok; +} + +=head2 $mech->base_is( $str [, $desc ] ) + +Tells if the base of the page is the given string. + + $mech->base_is( "http://example.com/" ); + +=cut + +sub base_is { + my $self = shift; + my $str = shift; + my $desc = shift; + + local $Test::Builder::Level = $Test::Builder::Level + 1; + return is_string( $self->base, $str, $desc ); +} + +=head2 $mech->base_like( $regex [, $desc ] ) + +Tells if the base of the page matches the given regex. + + $mech->base_like( qr{http://example.com/index.php?PHPSESSID=(.+)}); + +=cut + +sub base_like { + my $self = shift; + my $regex = shift; + my $desc = shift; + + local $Test::Builder::Level = $Test::Builder::Level + 1; + return like_string( $self->base, $regex, $desc ); +} + +=head2 $mech->base_unlike( $regex [, $desc ] ) + +Tells if the base of the page matches the given regex. + + $mech->base_unlike( qr{http://example.com/index.php?PHPSESSID=(.+)}); + +=cut + +sub base_unlike { + my $self = shift; + my $regex = shift; + my $desc = shift; + + local $Test::Builder::Level = $Test::Builder::Level + 1; + return unlike_string( $self->base, $regex, $desc ); } =head2 $mech->title_is( $str [, $desc ] ) ----------------------------------- $B")(B153-0063 $BEl5~ETL\9u6hL\9u(B1-4-16 $BL\9u(BG$B%S%k(B6F TEL 03-5740-6155 FAX 03-5740-6156 $B3t<02q<R%b%P%$%k%U%!%/%H%j!<(B $B%7%9%F%`3+H/It(B $B>>Ln(B $BFABg(B mail$B!'(Btokuhiro@mfac.jp url$B!'(Bhttp://www.mobilefactory.jp/ -----------------------------------
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream; x-unix-mode=0666; name="TestWWWMechanize-base.diff"
Content-Disposition: attachment; filename=TestWWWMechanize-base.diff
Content-Length: 1446

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

MIME-Version: 1.0
In-Reply-To: <f852fd5547b09d432616da6d2cff6469 [...] mfac.jp>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-2879-1150688916-1416.14465-0-0 [...] rt.cpan.org>
References: <f852fd5547b09d432616da6d2cff6469 [...] mfac.jp>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 33
Thanks. I've added this in 1.10.


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.