diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-03 02:44:36 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-03 02:44:36 +0000 |
commit | 42c34dd375c368d8e08f5243571d6983c9d02e19 (patch) | |
tree | ca65f172177fd534d6048825636d265636c8a396 /test/pathname/test_pathname.rb | |
parent | 83c7e46aa795f949122e0a8cafb3fc905992ddd2 (diff) |
merge revision(s) 34372:
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
(rb_enc_path_last_separator, rb_enc_path_end)
(ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
path handling functions.
* file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
(rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
(rb_file_join): should respect the encodings of arguments than
file system encoding. [ruby-dev:45145] [Bug #5919]
* dir.c (check_dirname, ruby_glob0): ditto.
* ext/pathname/pathname.c (path_sub_ext): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/pathname/test_pathname.rb')
-rw-r--r-- | test/pathname/test_pathname.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index 8a8c0d9844..61d288d68d 100644 --- a/test/pathname/test_pathname.rb +++ b/test/pathname/test_pathname.rb @@ -1,5 +1,3 @@ -#!/usr/bin/env ruby - require 'test/unit' require 'pathname' @@ -185,10 +183,8 @@ class TestPathname < Test::Unit::TestCase if DOSISH defassert(:del_trailing_separator, "a", "a\\") - require 'Win32API' - if Win32API.new('kernel32', 'GetACP', nil, 'L').call == 932 - defassert(:del_trailing_separator, "\225\\", "\225\\\\") # SJIS - end + defassert(:del_trailing_separator, "\225\\".force_encoding("cp932"), "\225\\\\".force_encoding("cp932")) + defassert(:del_trailing_separator, "\225".force_encoding("cp437"), "\225\\\\".force_encoding("cp437")) end def test_plus |