diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 13:58:31 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 13:58:31 +0000 |
commit | db590b5d599598e025ba625bc4cc1e39f910c640 (patch) | |
tree | 4224bf83f4d67b705d779ab563567d63b8f3b08d /test | |
parent | 926103a958c9719074f190fb7ac622a160008313 (diff) | |
download | ruby-db590b5d599598e025ba625bc4cc1e39f910c640.tar.gz |
Fixed unexpected behavior of `Resolv::MDNS#each_address` when given ".local" address.
https://github.com/ruby/ruby/pull/1425
Patch by @elct9620 [fix GH-1484]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/resolv/test_mdns.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/resolv/test_mdns.rb b/test/resolv/test_mdns.rb new file mode 100644 index 0000000000..eea10296c4 --- /dev/null +++ b/test/resolv/test_mdns.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: false +require 'test/unit' +require 'resolv' + +class TestResolvMDNS < Test::Unit::TestCase + def setup + end + + def test_mdns_each_address + mdns = Resolv::MDNS.new + mdns.each_resource '_http._tcp.local', Resolv::DNS::Resource::IN::PTR do |r| + srv = mdns.getresource r.name, Resolv::DNS::Resource::IN::SRV + mdns.each_address(srv.target) do |result| + assert_not_nil(result) + end + end + end +end |