aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_dir_m17n.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-19 08:06:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-19 08:06:53 +0000
commit29dc980e6562b4083f72f121465eca2f5427af39 (patch)
tree24def410aeff1aec27ed63e2c8a8b4a8f953ae3d /test/ruby/test_dir_m17n.rb
parent353cd01e2f926d4290784adced100d850f862d77 (diff)
downloadruby-29dc980e6562b4083f72f121465eca2f5427af39.tar.gz
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
Diffstat (limited to 'test/ruby/test_dir_m17n.rb')
-rw-r--r--test/ruby/test_dir_m17n.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb
index 16f8bade46..50aea013b5 100644
--- a/test/ruby/test_dir_m17n.rb
+++ b/test/ruby/test_dir_m17n.rb
@@ -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