Sha256: b60e6b9956c1e2b3a5963bf152eeac70018742405a807462b17fb75230f46f3f
Contents?: true
Size: 544 Bytes
Versions: 5
Compression:
Stored size: 544 Bytes
Contents
examples = File.expand_path('..', __FILE__) $LOAD_PATH.unshift(examples) unless $LOAD_PATH.include?(examples) # This file contains a suite of tests for the IPAddress grammar found in # ipaddress.citrus. require 'citrus' Citrus.require 'ipaddress' require 'test/unit' class IPAddressTest < Test::Unit::TestCase def test_v4 match = IPAddress.parse('1.2.3.4') assert(match) assert_equal(4, match.version) end def test_v6 match = IPAddress.parse('1:2:3:4::') assert(match) assert_equal(6, match.version) end end
Version data entries
5 entries across 5 versions & 1 rubygems