diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-20 14:40:53 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-20 14:40:53 +0000 |
commit | 80ecaa17776de97d8f7d9c256830edb45917987a (patch) | |
tree | d88ec0fbe5083628d38719678753d163ec2cc3e3 /test | |
parent | 62ff805f22bc23ddb4ba621588c43b97f902f546 (diff) |
merge revision(s) 40345: [Backport #8283]
* dir.c (glob_helper): should skip dot directories only for recursion,
but should not if matching to the given pattern. [ruby-core:54387]
[Bug #8283]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_dir.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 21902298c0..1c8f73e20c 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -177,6 +177,15 @@ class TestDir < Test::Unit::TestCase assert_equal(["a/b/c/d/e/f"], Dir.glob("a/**/c/?/e/f"), bug6977) assert_equal(["a/b/c/d/e/f"], Dir.glob("a/**/c/**/d/e/f"), bug6977) assert_equal(["a/b/c/d/e/f"], Dir.glob("a/**/c/**/d/e/f"), bug6977) + + bug8283 = '[ruby-core:54387] [Bug #8283]' + dirs = ["a/.x", "a/b/.y"] + FileUtils.mkdir_p(dirs) + dirs.map {|dir| open("#{dir}/z", "w") {}} + assert_equal([], Dir.glob("a/**/z").sort, bug8283) + assert_equal(["a/.x/z"], Dir.glob("a/**/.x/z"), bug8283) + assert_equal(["a/.x/z"], Dir.glob("a/.x/**/z"), bug8283) + assert_equal(["a/b/.y/z"], Dir.glob("a/**/.y/z"), bug8283) end end |