summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_dir_m17n.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb
index 04186e54a7..f8fc1ef5e4 100644
--- a/test/ruby/test_dir_m17n.rb
+++ b/test/ruby/test_dir_m17n.rb
@@ -362,6 +362,15 @@ class TestDir_M17N < Test::Unit::TestCase
end
end
+ def test_glob_encoding
+ with_tmpdir do
+ %W"file_one.ext file_two.ext".each {|f| open(f, "w") {}}
+ a = "file_one*".force_encoding Encoding::IBM437
+ b = "file_two*".force_encoding Encoding::EUC_JP
+ assert_equal([a, b].map(&:encoding), Dir[a, b].map(&:encoding))
+ end
+ end
+
def test_entries_compose
bug7267 = '[ruby-core:48745] [Bug #7267]'