From 5b06e833453dcbbf4da69a5f98d50e565d4300ef Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 8 Mar 2015 07:57:38 +0000 Subject: dir.c: glob short names * dir.c (glob_helper): match patterns against legacy short names too, not only ordinary names. [ruby-core:67954] [Bug #10819] * win32/dir.h (struct direct): add short name members. * win32/win32.c (opendir_internal, readdir_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_dir.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_dir.rb') diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 85fdd16dfd..69ea57d0a7 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -256,7 +256,11 @@ class TestDir < Test::Unit::TestCase skip unless File.directory?(short) entries = Dir.glob("#{short}/Common*") assert_not_empty(entries, bug10819) - assert_equal(Dir.glob("#{File.expand_path(short)}/Common*"), entries, bug10819) + long = File.expand_path(short) + assert_equal(Dir.glob("#{long}/Common*"), entries, bug10819) + wild = short.sub(/1\z/, '*') + assert_include(Dir.glob(wild), long, bug10819) + assert_empty(entries - Dir.glob("#{wild}/Common*"), bug10819) end end -- cgit v1.2.3