public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/perl-overlay:perl514 commit in: dev-perl/Test-WWW-Mechanize/, dev-perl/Test-WWW-Mechanize/files/1.30/
@ 2011-05-01  6:57 Kent Fredric
  2011-05-01  6:55 ` [gentoo-commits] proj/perl-overlay:master " Kent Fredric
  2011-05-01  6:57 ` [gentoo-commits] proj/perl-overlay:perl514virtuals " Kent Fredric
  0 siblings, 2 replies; 4+ messages in thread
From: Kent Fredric @ 2011-05-01  6:57 UTC (permalink / raw
  To: gentoo-commits

commit:     27a3e0248ac0af33e3838b3ba8a6ab1dc3692611
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sun May  1 06:54:47 2011 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Sun May  1 06:55:20 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=27a3e024

[fix] Test-WWW-Mechanize ( Perl 5.14 test fails, Misc pending upstream fixes )

(Portage version: 2.2.0_alpha30/git/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0A0CB301)

---
 dev-perl/Test-WWW-Mechanize/ChangeLog              |    7 +
 .../Test-WWW-Mechanize-1.30-r2.ebuild              |   29 ++++
 .../Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch |  155 ++++++++++++++++++++
 3 files changed, 191 insertions(+), 0 deletions(-)

diff --git a/dev-perl/Test-WWW-Mechanize/ChangeLog b/dev-perl/Test-WWW-Mechanize/ChangeLog
index f57481e..03500a1 100644
--- a/dev-perl/Test-WWW-Mechanize/ChangeLog
+++ b/dev-perl/Test-WWW-Mechanize/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/dev-perl/Test-WWW-Mechanize/ChangeLog,v 1.34 2011/01/04 19:11:47 tove Exp $
 
+*Test-WWW-Mechanize-1.30-r2 (01 May 2011)
+
+  01 May 2011; Kent Fredric <kentfredric@gmail.com>
+  +files/1.30/fix_dns-r2.patch, +Test-WWW-Mechanize-1.30-r2.ebuild:
+  Added more vendor patches to make tests pass again with recent modules and
+  Perl 5.14. Dep on 5.14 for tests because the tests aren't back-compat
+
 *Test-WWW-Mechanize-1.30-r1 (21 Apr 2011)
 
   21 Apr 2011; Kent Fredric <kentfredric@gmail.com> +files/1.30/fix_dns.patch,

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
new file mode 100644
index 0000000..b87a0aa
--- /dev/null
+++ b/dev-perl/Test-WWW-Mechanize/Test-WWW-Mechanize-1.30-r2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $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 $
+
+EAPI=3
+
+MODULE_AUTHOR=PETDANCE
+inherit perl-module
+
+DESCRIPTION="Testing-specific WWW::Mechanize subclass"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="test"
+PATCHES=(
+	"${FILESDIR}/${PV}/fix_dns-r2.patch"
+)
+RDEPEND=">=dev-perl/WWW-Mechanize-1.24
+	dev-perl/Carp-Assert-More
+	dev-perl/URI
+	>=dev-perl/Test-LongString-0.12"
+DEPEND="${RDEPEND}
+	test? ( >=dev-perl/HTTP-Server-Simple-0.35
+		dev-perl/Test-Pod
+		dev-perl/Test-Pod-Coverage
+		>dev-lang/perl-5.13.999
+	)"
+
+SRC_TEST="do"

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
new file mode 100644
index 0000000..e13d18c
--- /dev/null
+++ b/dev-perl/Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch
@@ -0,0 +1,155 @@
+diff --git a/t/back_ok.t b/t/back_ok.t
+index 7042c90..d59df9e 100644
+--- a/t/back_ok.t
++++ b/t/back_ok.t
+@@ -47,14 +47,14 @@ GOOD_GET: {
+ }
+ 
+ BAD_GET: {
+-    my $badurl = 'http://wango.nonexistent.xx-only-testing/';
++    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
+     $mech->get($badurl);
+     ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
+ 
+     test_out( 'not ok 1 - Try to get bad URL' );
+     test_fail( +3 );
+     test_diag( '500' );
+-    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
++    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
+     my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
+     test_test( 'Fails to get nonexistent URI and reports failure' );
+ 
+diff --git a/t/content_lacks.t b/t/content_lacks.t
+index 0a9792c..fdd3525 100644
+--- a/t/content_lacks.t
++++ b/t/content_lacks.t
+@@ -35,7 +35,7 @@ test_out( q{not ok 1 - Shouldn't say it's a test page} );
+ test_fail(+4);
+ test_diag(q(    searched: "<html>\x{0a}    <head>\x{0a}        <title>Test Page</title>"...) );
+ test_diag(q(   and found: "Test Page") );
+-test_diag(q( at position: 33) );
++test_diag(q( at position: 33 (line 3 column 16)) );
+ $mech->content_lacks( 'Test Page', q{Shouldn't say it's a test page} );
+ test_test( 'Handles not finding it' );
+ 
+diff --git a/t/get_ok.t b/t/get_ok.t
+index 4df896f..f61ab81 100644
+--- a/t/get_ok.t
++++ b/t/get_ok.t
+@@ -48,14 +48,14 @@ GOOD_GET: {
+ }
+ 
+ BAD_GET: {
+-    my $badurl = 'http://wango.nonexistent.xx-only-testing/';
++    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
+     $mech->get($badurl);
+     ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
+ 
+     test_out( 'not ok 1 - Try to get bad URL' );
+     test_fail( +3 );
+     test_diag( '500' );
+-    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
++    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
+     my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
+     test_test( 'Fails to get nonexistent URI and reports failure' );
+ 
+diff --git a/t/head_ok.t b/t/head_ok.t
+index 4557e83..bbfc062 100644
+--- a/t/head_ok.t
++++ b/t/head_ok.t
+@@ -2,12 +2,21 @@
+ 
+ use strict;
+ use warnings;
+-use Test::More tests => 11;
++use Test::More;
+ use Test::Builder::Tester;
+ 
+-my $NONEXISTENT = 'blahblablah.xx-nonexistent.foo';
++use constant NONEXISTENT => 'http://blahblablah.xx-nonexistent.';
++BEGIN {
++    if ( gethostbyname( NONEXISTENT ) ) {
++        plan skip_all => 'Found an A record for the non-existent domain';
++    }
++}
++
++BEGIN {
++    plan tests => 11;
++    use_ok( 'Test::WWW::Mechanize' );
++}
+ 
+-require_ok( 'Test::WWW::Mechanize' );
+ 
+ use lib 't';
+ use TestServer;
+@@ -16,7 +25,7 @@ my $server      = TestServer->new;
+ my $pid         = $server->background;
+ my $server_root = $server->root;
+ 
+-my $mech = Test::WWW::Mechanize->new( autocheck => 0 );
++my $mech=Test::WWW::Mechanize->new( autocheck => 0 );
+ isa_ok($mech,'Test::WWW::Mechanize');
+ 
+ GOOD_HEAD: { # Stop giggling, you!
+@@ -37,22 +46,15 @@ GOOD_HEAD: { # Stop giggling, you!
+     test_test('HEAD existing URI and reports success - default desc');
+ }
+ 
+-# Bad HEAD test. Relies on getting an error finding a non-existent domain.
+-# Some ISPs "helpfully" provide resolution for non-existent domains,
+-# and thus this test fails by succeeding.  We check for this annoying
+-# behavior and skip this subtest if we get it.
+-SKIP: {
+-    skip "Found an A record for the non-existent domain $NONEXISTENT", 4
+-        if gethostbyname $NONEXISTENT;
+-
+-    my $badurl = "http://$NONEXISTENT/";
++BAD_HEAD: {
++    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
+     $mech->head($badurl);
+-    ok(!$mech->success, q{sanity check: we can't load $badurl} );
++    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
+ 
+     test_out( 'not ok 1 - Try to HEAD bad URL' );
+     test_fail( +3 );
+     test_diag( '500' );
+-    test_diag( qq{Can't connect to $NONEXISTENT:80 (Bad hostname '$NONEXISTENT')} );
++    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
+     my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
+     test_test( 'Fails to HEAD nonexistent URI and reports failure' );
+ 
+diff --git a/t/link_content.t b/t/link_content.t
+index 3f89e1c..22b83d3 100644
+--- a/t/link_content.t
++++ b/t/link_content.t
+@@ -36,7 +36,7 @@ $mech->link_content_like(\@urls,qr/Test/,'Checking all page links contain: Test'
+ test_test('Handles All page links contents successful');
+ 
+ # like - default desc
+-test_out('ok 1 - ' . scalar(@urls) . ' links are like \'(?-xism:Test)\'');
++test_out('ok 1 - ' . scalar(@urls) . ' links are like \'(?^:Test)\'');
+ $mech->link_content_like(\@urls,qr/Test/);
+ test_test('Handles All page links contents successful - default desc');
+ 
+@@ -61,7 +61,7 @@ $mech->link_content_unlike(\@urls,qr/BadTest/,'Checking all page links do not co
+ test_test('Handles All page links unlike contents successful');
+ 
+ # unlike - default desc
+-test_out('ok 1 - ' . scalar(@urls) . ' links are not like "(?-xism:BadTest)"');
++test_out('ok 1 - ' . scalar(@urls) . ' links are not like "(?^:BadTest)"');
+ $mech->link_content_unlike(\@urls,qr/BadTest/);
+ test_test('Handles All page links unlike contents successful - default desc');
+ 
+diff --git a/t/page_links_content.t b/t/page_links_content.t
+index 6c37393..a71df7f 100644
+--- a/t/page_links_content.t
++++ b/t/page_links_content.t
+@@ -34,7 +34,7 @@ $mech->page_links_content_like(qr/Test/,'Checking all page links contain: Test')
+ test_test('Handles All page links contents successful');
+ 
+ # like - default desc
+-test_out(q{ok 1 - All links are like "(?-xism:Test)"});
++test_out(q{ok 1 - All links are like "(?^:Test)"});
+ $mech->page_links_content_like(qr/Test/);
+ test_test('Handles All page links contents successful');
+ 



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] proj/perl-overlay:master commit in: dev-perl/Test-WWW-Mechanize/, dev-perl/Test-WWW-Mechanize/files/1.30/
@ 2011-05-01  7:06 Kent Fredric
  2011-05-05 18:16 ` [gentoo-commits] proj/perl-overlay:perl514 " Kent Fredric
  0 siblings, 1 reply; 4+ messages in thread
From: Kent Fredric @ 2011-05-01  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     f454abe2d3fd99b57189dde2de511c1945d23043
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sun May  1 07:06:12 2011 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Sun May  1 07:06:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=f454abe2

[fix] regenerate -r2 patch to TWM to actually work

(Portage version: 2.2.0_alpha30/git/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0A0CB301)

---
 dev-perl/Test-WWW-Mechanize/ChangeLog              |    4 +
 .../Test-WWW-Mechanize/files/1.30/fix_dns-r2.patch |   84 ++++++++------------
 2 files changed, 38 insertions(+), 50 deletions(-)

diff --git a/dev-perl/Test-WWW-Mechanize/ChangeLog b/dev-perl/Test-WWW-Mechanize/ChangeLog
index 03500a1..104ae66 100644
--- a/dev-perl/Test-WWW-Mechanize/ChangeLog
+++ b/dev-perl/Test-WWW-Mechanize/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/dev-perl/Test-WWW-Mechanize/ChangeLog,v 1.34 2011/01/04 19:11:47 tove Exp $
 
+  01 May 2011; Kent Fredric <kentfredric@gmail.com>
+  files/1.30/fix_dns-r2.patch:
+  Regenerate patch to actually work
+
 *Test-WWW-Mechanize-1.30-r2 (01 May 2011)
 
   01 May 2011; Kent Fredric <kentfredric@gmail.com>

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
index e13d18c..ccfac4c 100644
--- 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
@@ -1,3 +1,31 @@
+diff --git a/Changes b/Changes
+index b796ca8..54ad52d 100644
+--- a/Changes
++++ b/Changes
+@@ -15,6 +15,10 @@ Added $mech->text_contains(), $mech->text_like() and $mech->text_unlike()
+ methods.  These check the text of an HTML page separate from the
+ HTML markup.  Thanks to Ashley Pond V.
+ 
++[FIXED]
++t/head_ok.t should no longer fail if your ISP "helpfully" returns
++an IP address for non-existent DNS records.  Thanks, Schwern.
++
+ 
+ 1.28    Tue Apr 13 00:44:27 CDT 2010
+ ------------------------------------
+diff --git a/Mechanize.pm b/Mechanize.pm
+index 1489344..3f4d54a 100644
+--- a/Mechanize.pm
++++ b/Mechanize.pm
+@@ -100,7 +100,7 @@ called.
+ 
+ =back
+ 
+-This means you no longerhave to do the following:
++This means you no longer have to do the following:
+ 
+     my $mech = Test::WWW::Mechanize->new();
+     $mech->get_ok( $url, 'Fetch the intro page' );
 diff --git a/t/back_ok.t b/t/back_ok.t
 index 7042c90..d59df9e 100644
 --- a/t/back_ok.t
@@ -54,66 +82,22 @@ index 4df896f..f61ab81 100644
      test_test( 'Fails to get nonexistent URI and reports failure' );
  
 diff --git a/t/head_ok.t b/t/head_ok.t
-index 4557e83..bbfc062 100644
+index c123e70..bbfc062 100644
 --- a/t/head_ok.t
 +++ b/t/head_ok.t
-@@ -2,12 +2,21 @@
- 
- use strict;
- use warnings;
--use Test::More tests => 11;
-+use Test::More;
- use Test::Builder::Tester;
- 
--my $NONEXISTENT = 'blahblablah.xx-nonexistent.foo';
-+use constant NONEXISTENT => 'http://blahblablah.xx-nonexistent.';
-+BEGIN {
-+    if ( gethostbyname( NONEXISTENT ) ) {
-+        plan skip_all => 'Found an A record for the non-existent domain';
-+    }
-+}
-+
-+BEGIN {
-+    plan tests => 11;
-+    use_ok( 'Test::WWW::Mechanize' );
-+}
- 
--require_ok( 'Test::WWW::Mechanize' );
- 
- use lib 't';
- use TestServer;
-@@ -16,7 +25,7 @@ my $server      = TestServer->new;
- my $pid         = $server->background;
- my $server_root = $server->root;
- 
--my $mech = Test::WWW::Mechanize->new( autocheck => 0 );
-+my $mech=Test::WWW::Mechanize->new( autocheck => 0 );
- isa_ok($mech,'Test::WWW::Mechanize');
- 
- GOOD_HEAD: { # Stop giggling, you!
-@@ -37,22 +46,15 @@ GOOD_HEAD: { # Stop giggling, you!
-     test_test('HEAD existing URI and reports success - default desc');
+@@ -47,14 +47,14 @@ GOOD_HEAD: { # Stop giggling, you!
  }
  
--# Bad HEAD test. Relies on getting an error finding a non-existent domain.
--# Some ISPs "helpfully" provide resolution for non-existent domains,
--# and thus this test fails by succeeding.  We check for this annoying
--# behavior and skip this subtest if we get it.
--SKIP: {
--    skip "Found an A record for the non-existent domain $NONEXISTENT", 4
--        if gethostbyname $NONEXISTENT;
--
--    my $badurl = "http://$NONEXISTENT/";
-+BAD_HEAD: {
+ BAD_HEAD: {
+-    my $badurl = 'http://wango.nonexistent.xx-only-testing/';
 +    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
      $mech->head($badurl);
--    ok(!$mech->success, q{sanity check: we can't load $badurl} );
-+    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
+     ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
  
      test_out( 'not ok 1 - Try to HEAD bad URL' );
      test_fail( +3 );
      test_diag( '500' );
--    test_diag( qq{Can't connect to $NONEXISTENT:80 (Bad hostname '$NONEXISTENT')} );
+-    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
 +    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname)} );
      my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
      test_test( 'Fails to HEAD nonexistent URI and reports failure' );



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-05 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-01  6:57 [gentoo-commits] proj/perl-overlay:perl514 commit in: dev-perl/Test-WWW-Mechanize/, dev-perl/Test-WWW-Mechanize/files/1.30/ Kent Fredric
2011-05-01  6:55 ` [gentoo-commits] proj/perl-overlay:master " Kent Fredric
2011-05-01  6:57 ` [gentoo-commits] proj/perl-overlay:perl514virtuals " Kent Fredric
  -- strict thread matches above, loose matches on Subject: below --
2011-05-01  7:06 [gentoo-commits] proj/perl-overlay:master " Kent Fredric
2011-05-05 18:16 ` [gentoo-commits] proj/perl-overlay:perl514 " Kent Fredric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox