mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix for IPv6 env
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
82a9714530
commit
afe296be78
1 changed files with 3 additions and 2 deletions
|
@ -12,15 +12,16 @@ class TestResolvMDNS < Test::Unit::TestCase
|
|||
yield typeclass.new("::1")
|
||||
end
|
||||
end
|
||||
addrs = mdns.__send__(:use_ipv6?) ? ["127.0.0.1", "::1"] : ["127.0.0.1"]
|
||||
[
|
||||
["example.com", []],
|
||||
["foo.local", ["127.0.0.1"]],
|
||||
["foo.local", addrs],
|
||||
].each do |name, expect|
|
||||
results = []
|
||||
mdns.each_address(name) do |result|
|
||||
results << result.to_s
|
||||
end
|
||||
assert_equal expect, results, "GH-1484"
|
||||
assert_equal expect, results.sort, "GH-1484"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue