aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_file_exhaustive.rb27
1 files changed, 15 insertions, 12 deletions
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