diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-25 02:50:17 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-25 02:50:17 +0000 |
commit | d81591607172afe8c92e6de72f7fa515aaa3d0bf (patch) | |
tree | 599fba3c99c04f927663f70b43ea0e6956818834 /test/ruby/test_dir_m17n.rb | |
parent | 5f6bb0dc64832f36c32cc4c02e0c8a08cc68317c (diff) | |
download | ruby-d81591607172afe8c92e6de72f7fa515aaa3d0bf.tar.gz |
* 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
Diffstat (limited to 'test/ruby/test_dir_m17n.rb')
-rw-r--r-- | test/ruby/test_dir_m17n.rb | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index 81accb7f93..6701e0b1a5 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -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 |