summaryrefslogtreecommitdiff
blob: ccfac4c1fc6c38d1244e6ea7f331921de79256be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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
+++ 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 c123e70..bbfc062 100644
--- a/t/head_ok.t
+++ b/t/head_ok.t
@@ -47,14 +47,14 @@ GOOD_HEAD: { # Stop giggling, you!
 }
 
 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 NONEXISTENT.html} );
 
     test_out( 'not ok 1 - Try to HEAD 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->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');