aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_fnmatch.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-04 01:19:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-04 01:19:11 +0000
commite59d5667c7769ffbe77f50687cb4393ca9280b2b (patch)
tree3be4e57580f1ad886bb48661ffd1a7b1f309f5cb /test/ruby/test_fnmatch.rb
parent7ba2f1a9ddd7efc36aa3bfddbefc262b5fe6c990 (diff)
downloadruby-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.rb6
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