diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-04 01:19:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-04 01:19:11 +0000 |
commit | e59d5667c7769ffbe77f50687cb4393ca9280b2b (patch) | |
tree | 3be4e57580f1ad886bb48661ffd1a7b1f309f5cb /test/ruby/test_fnmatch.rb | |
parent | 7ba2f1a9ddd7efc36aa3bfddbefc262b5fe6c990 (diff) | |
download | ruby-e59d5667c7769ffbe77f50687cb4393ca9280b2b.tar.gz |
dir.c: FNM_EXTGLOB
* dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB
is set. [ruby-core:40037] [Feature #5422]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_fnmatch.rb')
-rw-r--r-- | test/ruby/test_fnmatch.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_fnmatch.rb b/test/ruby/test_fnmatch.rb index e5f5ba6a4f..d186638a7b 100644 --- a/test/ruby/test_fnmatch.rb +++ b/test/ruby/test_fnmatch.rb @@ -1,4 +1,5 @@ require 'test/unit' +require_relative 'envutil' class TestFnmatch < Test::Unit::TestCase @@ -103,4 +104,9 @@ class TestFnmatch < Test::Unit::TestCase assert(File.fnmatch('**/foo', 'c:/root/foo', File::FNM_PATHNAME)) end + def test_extglob + feature5422 = '[ruby-core:40037]' + assert_file.for(feature5422).not_fnmatch?( "{.g,t}*", ".gem") + assert_file.for(feature5422).fnmatch?("{.g,t}*", ".gem", File::FNM_EXTGLOB) + end end |