From 0bb4934afbbf25b3c4543128eca215754237a049 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 15 Dec 2013 07:41:59 +0000 Subject: [PATCH] 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 --- test/ruby/test_dir.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 036bb94331..6054b8f7fe 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -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