1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test: try File.symlink with invalid paths

* test (have_symlink?): try File.symlink with invalid paths to
  test the administrator privilege, nil just raises an
  ArgumentError before trying the actual API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-29 01:25:07 +00:00
parent 754b3342fe
commit 8879d73ffd
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ class TestFileUtils < Test::Unit::TestCase
end
def check_have_symlink?
File.symlink nil, nil
File.symlink "", ""
rescue NotImplementedError, Errno::EACCES
return false
rescue

View file

@ -339,7 +339,7 @@ class TestPathname < Test::Unit::TestCase
def has_symlink?
begin
File.symlink(nil, nil)
File.symlink("", "")
rescue NotImplementedError, Errno::EACCES
return false
rescue TypeError