Gentoo Archives: gentoo-commits

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/perl-overlay:perl514 commit in: dev-perl/Test-WWW-Mechanize/, dev-perl/Test-WWW-Mechanize/files/1.30/
Date: Sun, 01 May 2011 06:59:49
Message-Id: 27a3e0248ac0af33e3838b3ba8a6ab1dc3692611.kent@gentoo
1 commit: 27a3e0248ac0af33e3838b3ba8a6ab1dc3692611
2 Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
3 AuthorDate: Sun May 1 06:54:47 2011 +0000
4 Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com>
5 CommitDate: Sun May 1 06:55:20 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=27a3e024
7
8 [fix] Test-WWW-Mechanize ( Perl 5.14 test fails, Misc pending upstream fixes )
9
10 (Portage version: 2.2.0_alpha30/git/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0A0CB301)
11
12 ---
13 dev-perl/Test-WWW-Mechanize/ChangeLog | 7 +
14 .../Test-WWW-Mechanize-1.30-r2.ebuild | 29 ++++
15 .../Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch | 155 ++++++++++++++++++++
16 3 files changed, 191 insertions(+), 0 deletions(-)
17
18 diff --git a/dev-perl/Test-WWW-Mechanize/ChangeLog b/dev-perl/Test-WWW-Mechanize/ChangeLog
19 index f57481e..03500a1 100644
20 --- a/dev-perl/Test-WWW-Mechanize/ChangeLog
21 +++ b/dev-perl/Test-WWW-Mechanize/ChangeLog
22 @@ -2,6 +2,13 @@
23 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
24 # $Header: /var/cvsroot/gentoo-x86/dev-perl/Test-WWW-Mechanize/ChangeLog,v 1.34 2011/01/04 19:11:47 tove Exp $
25
26 +*Test-WWW-Mechanize-1.30-r2 (01 May 2011)
27 +
28 + 01 May 2011; Kent Fredric <kentfredric@×××××.com>
29 + +files/1.30/fix_dns-r2.patch, +Test-WWW-Mechanize-1.30-r2.ebuild:
30 + Added more vendor patches to make tests pass again with recent modules and
31 + Perl 5.14. Dep on 5.14 for tests because the tests aren't back-compat
32 +
33 *Test-WWW-Mechanize-1.30-r1 (21 Apr 2011)
34
35 21 Apr 2011; Kent Fredric <kentfredric@×××××.com> +files/1.30/fix_dns.patch,
36
37 diff --git a/dev-perl/Test-WWW-Mechanize/Test-WWW-Mechanize-1.30-r2.ebuild b/dev-perl/Test-WWW-Mechanize/Test-WWW-Mechanize-1.30-r2.ebuild
38 new file mode 100644
39 index 0000000..b87a0aa
40 --- /dev/null
41 +++ b/dev-perl/Test-WWW-Mechanize/Test-WWW-Mechanize-1.30-r2.ebuild
42 @@ -0,0 +1,29 @@
43 +# Copyright 1999-2011 Gentoo Foundation
44 +# Distributed under the terms of the GNU General Public License v2
45 +# $Header: /var/cvsroot/gentoo-x86/dev-perl/Test-WWW-Mechanize/Test-WWW-Mechanize-1.30.ebuild,v 1.1 2010/06/12 11:58:40 tove Exp $
46 +
47 +EAPI=3
48 +
49 +MODULE_AUTHOR=PETDANCE
50 +inherit perl-module
51 +
52 +DESCRIPTION="Testing-specific WWW::Mechanize subclass"
53 +
54 +SLOT="0"
55 +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
56 +IUSE="test"
57 +PATCHES=(
58 + "${FILESDIR}/${PV}/fix_dns-r2.patch"
59 +)
60 +RDEPEND=">=dev-perl/WWW-Mechanize-1.24
61 + dev-perl/Carp-Assert-More
62 + dev-perl/URI
63 + >=dev-perl/Test-LongString-0.12"
64 +DEPEND="${RDEPEND}
65 + test? ( >=dev-perl/HTTP-Server-Simple-0.35
66 + dev-perl/Test-Pod
67 + dev-perl/Test-Pod-Coverage
68 + >dev-lang/perl-5.13.999
69 + )"
70 +
71 +SRC_TEST="do"
72
73 diff --git a/dev-perl/Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch b/dev-perl/Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch
74 new file mode 100644
75 index 0000000..e13d18c
76 --- /dev/null
77 +++ b/dev-perl/Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch
78 @@ -0,0 +1,155 @@
79 +diff --git a/t/back_ok.t b/t/back_ok.t
80 +index 7042c90..d59df9e 100644
81 +--- a/t/back_ok.t
82 ++++ b/t/back_ok.t
83 +@@ -47,14 +47,14 @@ GOOD_GET: {
84 + }
85 +
86 + BAD_GET: {
87 +- my $badurl = 'http://wango.nonexistent.xx-only-testing/';
88 ++ my $badurl = 'http://wango.nonexistent.xx-only-testing./';
89 + $mech->get($badurl);
90 + ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
91 +
92 + test_out( 'not ok 1 - Try to get bad URL' );
93 + test_fail( +3 );
94 + test_diag( '500' );
95 +- test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
96 ++ test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
97 + my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
98 + test_test( 'Fails to get nonexistent URI and reports failure' );
99 +
100 +diff --git a/t/content_lacks.t b/t/content_lacks.t
101 +index 0a9792c..fdd3525 100644
102 +--- a/t/content_lacks.t
103 ++++ b/t/content_lacks.t
104 +@@ -35,7 +35,7 @@ test_out( q{not ok 1 - Shouldn't say it's a test page} );
105 + test_fail(+4);
106 + test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>"...) );
107 + test_diag(q( and found: "Test Page") );
108 +-test_diag(q( at position: 33) );
109 ++test_diag(q( at position: 33 (line 3 column 16)) );
110 + $mech->content_lacks( 'Test Page', q{Shouldn't say it's a test page} );
111 + test_test( 'Handles not finding it' );
112 +
113 +diff --git a/t/get_ok.t b/t/get_ok.t
114 +index 4df896f..f61ab81 100644
115 +--- a/t/get_ok.t
116 ++++ b/t/get_ok.t
117 +@@ -48,14 +48,14 @@ GOOD_GET: {
118 + }
119 +
120 + BAD_GET: {
121 +- my $badurl = 'http://wango.nonexistent.xx-only-testing/';
122 ++ my $badurl = 'http://wango.nonexistent.xx-only-testing./';
123 + $mech->get($badurl);
124 + ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
125 +
126 + test_out( 'not ok 1 - Try to get bad URL' );
127 + test_fail( +3 );
128 + test_diag( '500' );
129 +- test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
130 ++ test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
131 + my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
132 + test_test( 'Fails to get nonexistent URI and reports failure' );
133 +
134 +diff --git a/t/head_ok.t b/t/head_ok.t
135 +index 4557e83..bbfc062 100644
136 +--- a/t/head_ok.t
137 ++++ b/t/head_ok.t
138 +@@ -2,12 +2,21 @@
139 +
140 + use strict;
141 + use warnings;
142 +-use Test::More tests => 11;
143 ++use Test::More;
144 + use Test::Builder::Tester;
145 +
146 +-my $NONEXISTENT = 'blahblablah.xx-nonexistent.foo';
147 ++use constant NONEXISTENT => 'http://blahblablah.xx-nonexistent.';
148 ++BEGIN {
149 ++ if ( gethostbyname( NONEXISTENT ) ) {
150 ++ plan skip_all => 'Found an A record for the non-existent domain';
151 ++ }
152 ++}
153 ++
154 ++BEGIN {
155 ++ plan tests => 11;
156 ++ use_ok( 'Test::WWW::Mechanize' );
157 ++}
158 +
159 +-require_ok( 'Test::WWW::Mechanize' );
160 +
161 + use lib 't';
162 + use TestServer;
163 +@@ -16,7 +25,7 @@ my $server = TestServer->new;
164 + my $pid = $server->background;
165 + my $server_root = $server->root;
166 +
167 +-my $mech = Test::WWW::Mechanize->new( autocheck => 0 );
168 ++my $mech=Test::WWW::Mechanize->new( autocheck => 0 );
169 + isa_ok($mech,'Test::WWW::Mechanize');
170 +
171 + GOOD_HEAD: { # Stop giggling, you!
172 +@@ -37,22 +46,15 @@ GOOD_HEAD: { # Stop giggling, you!
173 + test_test('HEAD existing URI and reports success - default desc');
174 + }
175 +
176 +-# Bad HEAD test. Relies on getting an error finding a non-existent domain.
177 +-# Some ISPs "helpfully" provide resolution for non-existent domains,
178 +-# and thus this test fails by succeeding. We check for this annoying
179 +-# behavior and skip this subtest if we get it.
180 +-SKIP: {
181 +- skip "Found an A record for the non-existent domain $NONEXISTENT", 4
182 +- if gethostbyname $NONEXISTENT;
183 +-
184 +- my $badurl = "http://$NONEXISTENT/";
185 ++BAD_HEAD: {
186 ++ my $badurl = 'http://wango.nonexistent.xx-only-testing./';
187 + $mech->head($badurl);
188 +- ok(!$mech->success, q{sanity check: we can't load $badurl} );
189 ++ ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
190 +
191 + test_out( 'not ok 1 - Try to HEAD bad URL' );
192 + test_fail( +3 );
193 + test_diag( '500' );
194 +- test_diag( qq{Can't connect to $NONEXISTENT:80 (Bad hostname '$NONEXISTENT')} );
195 ++ test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
196 + my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
197 + test_test( 'Fails to HEAD nonexistent URI and reports failure' );
198 +
199 +diff --git a/t/link_content.t b/t/link_content.t
200 +index 3f89e1c..22b83d3 100644
201 +--- a/t/link_content.t
202 ++++ b/t/link_content.t
203 +@@ -36,7 +36,7 @@ $mech->link_content_like(\@urls,qr/Test/,'Checking all page links contain: Test'
204 + test_test('Handles All page links contents successful');
205 +
206 + # like - default desc
207 +-test_out('ok 1 - ' . scalar(@urls) . ' links are like \'(?-xism:Test)\'');
208 ++test_out('ok 1 - ' . scalar(@urls) . ' links are like \'(?^:Test)\'');
209 + $mech->link_content_like(\@urls,qr/Test/);
210 + test_test('Handles All page links contents successful - default desc');
211 +
212 +@@ -61,7 +61,7 @@ $mech->link_content_unlike(\@urls,qr/BadTest/,'Checking all page links do not co
213 + test_test('Handles All page links unlike contents successful');
214 +
215 + # unlike - default desc
216 +-test_out('ok 1 - ' . scalar(@urls) . ' links are not like "(?-xism:BadTest)"');
217 ++test_out('ok 1 - ' . scalar(@urls) . ' links are not like "(?^:BadTest)"');
218 + $mech->link_content_unlike(\@urls,qr/BadTest/);
219 + test_test('Handles All page links unlike contents successful - default desc');
220 +
221 +diff --git a/t/page_links_content.t b/t/page_links_content.t
222 +index 6c37393..a71df7f 100644
223 +--- a/t/page_links_content.t
224 ++++ b/t/page_links_content.t
225 +@@ -34,7 +34,7 @@ $mech->page_links_content_like(qr/Test/,'Checking all page links contain: Test')
226 + test_test('Handles All page links contents successful');
227 +
228 + # like - default desc
229 +-test_out(q{ok 1 - All links are like "(?-xism:Test)"});
230 ++test_out(q{ok 1 - All links are like "(?^:Test)"});
231 + $mech->page_links_content_like(qr/Test/);
232 + test_test('Handles All page links contents successful');
233 +