1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_process.rb (TestProcess#test_no_curdir): skip silently on

Windows, because this tests a platform specific feature and it'll never be
  supported on ruby on Windows.

* test/ruby/test_dir_m17n.rb (TestDir_M17N#test_filename_extutf8_invalid,
  TestDir_M17N#test_filename_as_bytes_extutf8): ditto.

* test/open-uri/test_open-uri.rb
  (TestOpenURI#test_find_proxy_case_sensitive_env): ditto.

* test/dl/test_handle.rb (DL::TestHandle#test_NEXT,
  DL::TestHandle#test_DEFAULT): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2011-03-25 02:50:17 +00:00
parent 5f6bb0dc64
commit d815916071
5 changed files with 35 additions and 23 deletions

View file

@ -26,7 +26,6 @@ class TestDir_M17N < Test::Unit::TestCase
end
def test_filename_extutf8_invalid
skip "ruby on windows doesn't support invalid utf-8 path" if /mswin|mingw/ =~ RUBY_PLATFORM
with_tmpdir {|d|
assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d)
filename = "\xff".force_encoding("ASCII-8BIT") # invalid byte sequence as UTF-8
@ -43,7 +42,7 @@ class TestDir_M17N < Test::Unit::TestCase
exit ents.include?(filename) || ((RUBY_PLATFORM =~ /darwin/) != nil && ents.include?("%FF"))
EOS
}
end
end unless /mswin|mingw/ =~ RUBY_PLATFORM
def test_filename_as_bytes_extutf8
with_tmpdir {|d|
@ -67,18 +66,20 @@ class TestDir_M17N < Test::Unit::TestCase
exit false
end
EOS
skip "no meaning test on windows" if /mswin|mingw/ =~ RUBY_PLATFORM
assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
filename1 = "\xc2\xa1".force_encoding("utf-8")
filename2 = "\xc2\xa1".force_encoding("euc-jp")
filename3 = filename1.encode("euc-jp")
filename4 = filename2.encode("utf-8")
s1 = File.stat(filename1) rescue nil
s2 = File.stat(filename2) rescue nil
s3 = File.stat(filename3) rescue nil
s4 = File.stat(filename4) rescue nil
exit((s1 && s2 && !s3 && !s4) ? true : false)
EOS
# no meaning test on windows
unless /mswin|mingw/ =~ RUBY_PLATFORM
assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
filename1 = "\xc2\xa1".force_encoding("utf-8")
filename2 = "\xc2\xa1".force_encoding("euc-jp")
filename3 = filename1.encode("euc-jp")
filename4 = filename2.encode("utf-8")
s1 = File.stat(filename1) rescue nil
s2 = File.stat(filename2) rescue nil
s3 = File.stat(filename3) rescue nil
s4 = File.stat(filename4) rescue nil
exit((s1 && s2 && !s3 && !s4) ? true : false)
EOS
end
}
end