summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-12 09:45:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-12 09:45:09 +0000
commit58edb064c3f7a8f1056599d4113bbf438f8a2982 (patch)
tree5105f66ce7622fd74a96c466d53450be1daa40f9
parent60095cecc70850382b082e423f1740d59ca78798 (diff)
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
-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