Sha256: 27882722d2ba986eb09ee6edbf896f193568bf91bf417cdc336e934b9bc68983

Contents?: true

Size: 498 Bytes

Versions: 5

Compression:

Stored size: 498 Bytes

Contents

require 'test_helper'
require 'net/dns/names'

class NamesTest < Test::Unit::TestCase
  include Net::DNS::Names

  def test_long_names
    assert_nothing_raised do
      pack_name('a' * 63)
    end
    assert_raises ArgumentError do
      pack_name('a' * 64)
    end
    assert_nothing_raised do
      pack_name(['a' * 63, 'b' * 63, 'c' * 63, 'd' * 63].join('.'))
    end
    assert_raises ArgumentError do
      pack_name(['a' * 63, 'b' * 63, 'c' * 63, 'd' * 63, 'e'].join('.'))
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
net-dns2-0.8.2 test/names_test.rb
net-dns2-0.8.1 test/names_test.rb
net-dns-0.8.0 test/names_test.rb
net-dns-0.7.1 test/names_test.rb
net-dns-0.7.0 test/names_test.rb