summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 07:57:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-08 07:57:38 +0000
commit5b06e833453dcbbf4da69a5f98d50e565d4300ef (patch)
tree185ce18aa5c6db3d4144bab7bbbbe99cfa03f660 /test
parentdb24cb705dd1337129909ccd5923db0ebf695a13 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_dir.rb6
1 files changed, 5 insertions, 1 deletions
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