1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

add test to make sure num_ips == length

git-svn-id: file:///home/svn/framework3/trunk@7780 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
James Lee 2009-12-09 21:31:29 +00:00
parent e0bd6dd6ed
commit 683edd1462

View File

@ -4,6 +4,12 @@ require 'rex/socket'
require 'rex/socket/range_walker'
describe Rex::Socket::RangeWalker do
it "should have a num_ips attribute" do
walker = Rex::Socket::RangeWalker.new("")
walker.should respond_to("num_ips")
walker.should respond_to("length")
walker.num_ips.should == walker.length
end
it "should handle single ipv6 addresses" do
walker = Rex::Socket::RangeWalker.new("::1")
walker.should be_valid