mirror of
https://github.com/ruby/ruby.git
synced 2025-09-22 12:04:01 +02:00
dir.c: normalize cwd
* dir.c (rb_dir_getwd): normalize OS path to UTF-8 on OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8bcf81886f
commit
c604000a31
3 changed files with 19 additions and 0 deletions
|
@ -395,4 +395,14 @@ class TestDir_M17N < Test::Unit::TestCase
|
|||
pp.assert_equal(orig, ents, bug7267)
|
||||
}
|
||||
end
|
||||
|
||||
def test_pwd
|
||||
with_tmpdir {|d|
|
||||
orig = %W"d\u{e9}tente x\u{304c 304e 3050 3052 3054}"
|
||||
orig.each do |n|
|
||||
Dir.mkdir(n)
|
||||
assert_equal(n, File.basename(Dir.chdir(n) {Dir.pwd}))
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue