* ext/pathname/pathname.c (path_fnmatch): Pathname#fnmatch and

Pathname#fnmatch? translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-08-07 22:33:51 +00:00
parent d82dd262d0
commit b50fb9034e
4 changed files with 30 additions and 9 deletions

View file

@ -788,6 +788,8 @@ class TestPathname < Test::Unit::TestCase
path = Pathname("a")
assert_equal(true, path.fnmatch("*"))
assert_equal(false, path.fnmatch("*.*"))
assert_equal(false, Pathname(".foo").fnmatch("*"))
assert_equal(true, Pathname(".foo").fnmatch("*", File::FNM_DOTMATCH))
end
def test_fnmatch?