aboutsummaryrefslogtreecommitdiffstats
path: root/test/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'test/resolv')
-rw-r--r--test/resolv/test_mdns.rb18
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