Index: trunk/phase3/maintenance/tests/phpunit/includes/IPTest.php |
— | — | @@ -17,6 +17,7 @@ |
18 | 18 | $this->assertFalse( IP::isIPAddress( '124.24.52' ), 'IPv4 not enough quads' ); |
19 | 19 | $this->assertFalse( IP::isIPAddress( '24.324.52.13' ), 'IPv4 out of range' ); |
20 | 20 | $this->assertFalse( IP::isIPAddress( '.24.52.13' ), 'IPv4 starts with period' ); |
| 21 | + $this->assertFalse( IP::isIPAddress( 'fc:100:300' ), 'IPv6 with only 3 words' ); |
21 | 22 | |
22 | 23 | $this->assertTrue( IP::isIPAddress( '::' ), 'RFC 4291 IPv6 Unspecified Address' ); |
23 | 24 | $this->assertTrue( IP::isIPAddress( '::1' ), 'RFC 4291 IPv6 Loopback Address' ); |
— | — | @@ -34,6 +35,7 @@ |
35 | 36 | public function testisIPv6() { |
36 | 37 | $this->assertFalse( IP::isIPv6( ':fc:100::' ), 'IPv6 starting with lone ":"' ); |
37 | 38 | $this->assertFalse( IP::isIPv6( 'fc:100:::' ), 'IPv6 ending with a ":::"' ); |
| 39 | + $this->assertFalse( IP::isIPv6( 'fc:100:300' ), 'IPv6 with only 3 words' ); |
38 | 40 | $this->assertTrue( IP::isIPv6( 'fc:100::' ) ); |
39 | 41 | $this->assertTrue( IP::isIPv6( 'fc:100:a::' ) ); |
40 | 42 | $this->assertTrue( IP::isIPv6( 'fc:100:a:d::' ) ); |