diff options
Diffstat (limited to 'test/resolv')
-rw-r--r-- | test/resolv/test_dns.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb index bd5d2e1c02..4ace87c697 100644 --- a/test/resolv/test_dns.rb +++ b/test/resolv/test_dns.rb @@ -23,6 +23,20 @@ class TestResolvDNS < Test::Unit::TestCase end end + # [ruby-core:65836] + def test_resolve_with_2_ndots + conf = Resolv::DNS::Config.new :nameserver => ['127.0.0.1'], :ndots => 2 + assert conf.single? + + candidates = [] + conf.resolv('example.com') { |candidate, *args| + candidates << candidate + raise Resolv::DNS::Config::NXDomain + } + n = Resolv::DNS::Name.create 'example.com.' + assert_equal n, candidates.last + end + def test_query_ipv4_address begin OpenSSL |