Sha256: a34e21d33ae6108c95b69f9af9a26dbaf72adcfd255754817d9b295adc401167

Contents?: true

Size: 380 Bytes

Versions: 78

Compression:

Stored size: 380 Bytes

Contents

require File.expand_path('../../helper', __FILE__)
require 'citrus/grammars'

Citrus.require 'ipaddress'

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

78 entries across 78 versions & 2 rubygems

Version Path
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.94 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.93 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb
harbr-0.1.91 vendor/bundle/ruby/3.2.0/gems/citrus-3.0.2/test/grammars/ipaddress_test.rb