From a9490f49166afad22157db1e2cfdff72c4551bee Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 12 Jun 2016 09:45:09 +0000 Subject: File.expand_path compose test only on OS X * test/ruby/test_file_exhaustive.rb (test_expand_path_compose): valid only on OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_file_exhaustive.rb | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 5b02077410..9bfeece8c1 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -1094,19 +1094,22 @@ class TestFileExhaustive < Test::Unit::TestCase assert_equal('z:/bar/foo', File.expand_path('z:foo', '/bar'), bug10858) end if DRIVE - def test_expand_path_compose - pp = Object.new.extend(Test::Unit::Assertions) - def pp.mu_pp(str) #:nodoc: - str.dump - end + case RUBY_PLATFORM + when /darwin/ + def test_expand_path_compose + pp = Object.new.extend(Test::Unit::Assertions) + def pp.mu_pp(str) #:nodoc: + str.dump + end - Dir.mktmpdir do |dir| - Dir.chdir(dir) do - orig = %W"d\u{e9}tente x\u{304c 304e 3050 3052 3054}" - orig.each do |o| - Dir.mkdir(o) - n = Dir.chdir(o) {File.expand_path(".")} - pp.assert_equal(o, File.basename(n)) + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + orig = %W"d\u{e9}tente x\u{304c 304e 3050 3052 3054}" + orig.each do |o| + Dir.mkdir(o) + n = Dir.chdir(o) {File.expand_path(".")} + pp.assert_equal(o, File.basename(n)) + end end end end -- cgit v1.2.3