ruby-changes:32144
From: nobu <ko1@a...>
Date: Sun, 15 Dec 2013 16:42:05 +0900 (JST)
Subject: [ruby-changes:32144] nobu:r44223 (trunk): test_dir.rb: fix system dependent test
nobu 2013-12-15 16:41:59 +0900 (Sun, 15 Dec 2013) New Revision: 44223 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44223 Log: 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. Modified files: trunk/test/ruby/test_dir.rb Index: test/ruby/test_dir.rb =================================================================== --- test/ruby/test_dir.rb (revision 44222) +++ test/ruby/test_dir.rb (revision 44223) @@ -252,9 +252,14 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L252 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/