@@ -153,7 +153,7 @@ public function test8()
153153 $ this ->assertTrue ($ status );
154154
155155 $ status = Ip::match ('2001:cdba:0000:0000:0000:0000:3257:9652 ' ,
156- '2001:cdba:0000:0000:0000:0000:3257:1234-2001:cdba:0000:0000:0000:0000:3257:9999 ' );
156+ '2001:cdba:0000:0000:0000:0000:3257:1234-2001:cdba:0000:0000:0000:0000:3257:9999 ' );
157157 $ this ->assertTrue ($ status );
158158
159159
@@ -166,7 +166,7 @@ public function test8()
166166
167167
168168 $ status = Ip::match ('2001:cdba:0000:0000:0000:0000:3257:7778 ' ,
169- '2001:cdba:0000:0000:0000:0000:3257:1234-2001:cdba:0000:0000:0000:0000:3257:7777 ' );
169+ '2001:cdba:0000:0000:0000:0000:3257:1234-2001:cdba:0000:0000:0000:0000:3257:7777 ' );
170170 $ this ->assertFalse ($ status );
171171 }
172172
@@ -193,6 +193,20 @@ public function test9()
193193 /**
194194 * @test
195195 */
196+
197+
198+ public function test_match_range ()
199+ {
200+ $ range = Ip::matchRange ('192.168.100. ' , '192.168.. ' );
201+ $ this ->assertTrue ($ range );
202+
203+ $ range = Ip::matchRange ('192.168.1.200 ' , '192.168.1. ' );
204+ $ this ->assertTrue ($ range );
205+
206+ $ range = Ip::matchRange ('192.168.1.200 ' , '192.168.2. ' );
207+ $ this ->assertFalse ($ range );
208+ }
209+
196210 public function testLocal ()
197211 {
198212 $ status = Ip::isLocal ('192.168.5.5 ' );
0 commit comments