[前][次][番号順一覧][スレッド一覧]

ruby-changes:49259

From: usa <ko1@a...>
Date: Thu, 21 Dec 2017 01:04:45 +0900 (JST)
Subject: [ruby-changes:49259] usa:r61374 (trunk): fix test errors on Windows

usa	2017-12-21 01:04:41 +0900 (Thu, 21 Dec 2017)

  New Revision: 61374

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61374

  Log:
    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]

  Modified files:
    trunk/test/resolv/test_addr.rb
    trunk/test/resolv/test_dns.rb
Index: test/resolv/test_dns.rb
===================================================================
--- test/resolv/test_dns.rb	(revision 61373)
+++ test/resolv/test_dns.rb	(revision 61374)
@@ -182,7 +182,7 @@ class TestResolvDNS < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/resolv/test_dns.rb#L182
   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
Index: test/resolv/test_addr.rb
===================================================================
--- test/resolv/test_addr.rb	(revision 61373)
+++ test/resolv/test_addr.rb	(revision 61374)
@@ -32,7 +32,7 @@ class TestResolvAddr < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/resolv/test_addr.rb#L32
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]