ruby-changes:41599
From: usa <ko1@a...>
Date: Wed, 27 Jan 2016 20:59:13 +0900 (JST)
Subject: [ruby-changes:41599] usa:r53673 (trunk): * test/ruby/test_file.rb (TestFile#test_realpath_encoding): rescue Errno::EACCES
usa 2016-01-27 21:00:07 +0900 (Wed, 27 Jan 2016) New Revision: 53673 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53673 Log: * test/ruby/test_file.rb (TestFile#test_realpath_encoding): rescue Errno::EACCES and skip the testcase because it'll be raised on Windows always unless the runner doesn't have the administrator privilege. Modified files: trunk/test/ruby/test_file.rb Index: test/ruby/test_file.rb =================================================================== --- test/ruby/test_file.rb (revision 53672) +++ test/ruby/test_file.rb (revision 53673) @@ -268,7 +268,11 @@ class TestFile < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file.rb#L268 realdir = File.realpath(tmpdir) open(File.join(tmpdir, tst), "w") {} a = File.join(tmpdir, "x") - File.symlink(tst, a) + begin + File.symlink(tst, a) + rescue Errno::EACCES + skip "need privilege" + end assert_equal(File.join(realdir, tst), File.realpath(a)) File.unlink(a) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/