aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_dir_m17n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_dir_m17n.rb')
-rw-r--r--test/ruby/test_dir_m17n.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb
index a72598b360..04186e54a7 100644
--- a/test/ruby/test_dir_m17n.rb
+++ b/test/ruby/test_dir_m17n.rb
@@ -352,6 +352,16 @@ class TestDir_M17N < Test::Unit::TestCase
end
end
+ def test_glob_escape_multibyte
+ name = "\x81\\".force_encoding(Encoding::Shift_JIS)
+ with_tmpdir do
+ open(name, "w") {} rescue next
+ match, = Dir.glob("#{name}*")
+ next unless match and match.encoding == Encoding::Shift_JIS
+ assert_equal([name], Dir.glob("\\#{name}*"))
+ end
+ end
+
def test_entries_compose
bug7267 = '[ruby-core:48745] [Bug #7267]'