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

test_dir.rb: fix system dependent test

* test/ruby/test_dir.rb (test_symlinks_not_resolved): fix system
  dependent test which has no meanings unless symlink is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-12-15 07:41:59 +00:00
parent 1448b0abf5
commit 0bb4934afb

View file

@ -252,9 +252,14 @@ class TestDir < Test::Unit::TestCase
def test_symlinks_not_resolved
Dir.mktmpdir do |dirname|
Dir.chdir(dirname) do
begin
File.symlink('some-dir', 'dir-symlink')
rescue NotImplementedError
return
end
Dir.mkdir('some-dir')
File.write('some-dir/foo', 'some content')
File.symlink('some-dir', 'dir-symlink')
assert_equal [ 'dir-symlink', 'some-dir' ], Dir['*'].sort
assert_equal [ 'dir-symlink', 'some-dir', 'some-dir/foo' ], Dir['**/*'].sort