ruby-changes:43316
From: nobu <ko1@a...>
Date: Sun, 12 Jun 2016 18:45:14 +0900 (JST)
Subject: [ruby-changes:43316] nobu:r55390 (trunk): File.expand_path compose test only on OS X
nobu 2016-06-12 18:45:09 +0900 (Sun, 12 Jun 2016) New Revision: 55390 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55390 Log: File.expand_path compose test only on OS X * test/ruby/test_file_exhaustive.rb (test_expand_path_compose): valid only on OS X. Modified files: trunk/test/ruby/test_file_exhaustive.rb Index: test/ruby/test_file_exhaustive.rb =================================================================== --- test/ruby/test_file_exhaustive.rb (revision 55389) +++ test/ruby/test_file_exhaustive.rb (revision 55390) @@ -1094,19 +1094,22 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L1094 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/