Should call ln_s
only when symlink is available
* test/fileutils/test_fileutils.rb (test_ln_s): skip if symlink is not available. * test/fileutils/test_fileutils.rb (test_ln_s): remove created symlink certainly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fba0b81e18
commit
a852853f44
@ -785,12 +785,14 @@ class TestFileUtils < Test::Unit::TestCase
|
||||
|
||||
TARGETS.each do |fname|
|
||||
fname = "../#{fname}"
|
||||
ln_s fname, 'tmp/lnsdest'
|
||||
assert FileTest.symlink?('tmp/lnsdest'), 'not symlink'
|
||||
assert_equal fname, File.readlink('tmp/lnsdest')
|
||||
rm_f 'tmp/lnsdest'
|
||||
lnfname = 'tmp/lnsdest'
|
||||
ln_s fname, lnfname
|
||||
assert FileTest.symlink?(lnfname), 'not symlink'
|
||||
assert_equal fname, File.readlink(lnfname)
|
||||
ensure
|
||||
rm_f lnfname
|
||||
end
|
||||
end
|
||||
end if have_symlink? and !no_broken_symlink?
|
||||
|
||||
def test_ln_s_broken_symlink
|
||||
assert_nothing_raised {
|
||||
|
Loading…
x
Reference in New Issue
Block a user