summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-20 16:04:41 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-20 16:04:41 +0000
commit098c8d5491add1475dbf7fb8889bd53f47d5c8ca (patch)
treedd41ba1296985e27e554cf65c1accf36b4fe4b7a
parentac6db01fea4330f521ca5e1ff6e46c3a654df0a6 (diff)
downloadruby-098c8d5491add1475dbf7fb8889bd53f47d5c8ca.tar.gz
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
-rw-r--r--test/resolv/test_addr.rb2
-rw-r--r--test/resolv/test_dns.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/resolv/test_addr.rb b/test/resolv/test_addr.rb
index 78a28c9633..14ec2651ab 100644
--- a/test/resolv/test_addr.rb
+++ b/test/resolv/test_addr.rb
@@ -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
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
index 8236078374..1b44f32807 100644
--- a/test/resolv/test_dns.rb
+++ b/test/resolv/test_dns.rb
@@ -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