mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compose HFS file names
* dir.c (glob_helper): compose HFS file names from UTF8-MAC. [ruby-core:48745] [Bug #7267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
353cd01e2f
commit
29dc980e65
3 changed files with 87 additions and 2 deletions
|
@ -269,4 +269,22 @@ class TestDir_M17N < Test::Unit::TestCase
|
|||
m = Class.new {define_method(:to_path) {d}}
|
||||
assert_raise(Encoding::CompatibilityError) {Dir.glob(m.new)}
|
||||
end
|
||||
|
||||
def test_glob_compose
|
||||
bug7267 = '[ruby-core:48745] [Bug #7267]'
|
||||
|
||||
pp = Object.new.extend(Test::Unit::Assertions)
|
||||
def pp.mu_pp(str) #:nodoc:
|
||||
str.dump
|
||||
end
|
||||
|
||||
with_tmpdir {|d|
|
||||
orig = %W"d\u{e9}tente x\u{304c 304e 3050 3052 3054}"
|
||||
orig.each {|n| open(n, "w") {}}
|
||||
orig.each do |o|
|
||||
n = Dir.glob("#{o[0..0]}*")[0]
|
||||
pp.assert_equal(o, n, bug7267)
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue