mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix test errors on Windows
* test/resolv/test_addr.rb (test_hosts_by_command): on Windows, `|` is invalid charactor for path and raises `Errno::EINVAL` if trying to open. * test/resolv/test_dns.rb (test_resolv_conf_by_command): ditto. cf. [Bug #14205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ac6db01fea
commit
098c8d5491
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ class TestResolvAddr < Test::Unit::TestCase
|
|||
Dir.mktmpdir do |dir|
|
||||
Dir.chdir(dir) do
|
||||
hosts = Resolv::Hosts.new("|echo error")
|
||||
assert_raise(Errno::ENOENT) do
|
||||
assert_raise(Errno::ENOENT, Errno::EINVAL) do
|
||||
hosts.each_name("") {}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -182,7 +182,7 @@ class TestResolvDNS < Test::Unit::TestCase
|
|||
def test_resolv_conf_by_command
|
||||
Dir.mktmpdir do |dir|
|
||||
Dir.chdir(dir) do
|
||||
assert_raise(Errno::ENOENT) do
|
||||
assert_raise(Errno::ENOENT, Errno::EINVAL) do
|
||||
Resolv::DNS::Config.parse_resolv_conf("|echo foo")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue