Skip to content

Commit 8d83fce

Browse files
ahorekeregon
authored andcommitted
fnmatch not matching glob syntax
1 parent 16713ee commit 8d83fce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/file/shared/fnmatch.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@
126126
end
127127
end
128128

129+
it "matches wildcard with characters when flags includes FNM_PATHNAME" do
130+
File.send(@method, '*a', 'aa', File::FNM_PATHNAME).should == true
131+
File.send(@method, 'a*', 'aa', File::FNM_PATHNAME).should == true
132+
File.send(@method, 'a*', 'aaa', File::FNM_PATHNAME).should == true
133+
File.send(@method, '*a', 'aaa', File::FNM_PATHNAME).should == true
134+
end
135+
129136
it "does not match '/' characters with ? or * when flags includes FNM_PATHNAME" do
130137
File.send(@method, '?', '/', File::FNM_PATHNAME).should == false
131138
File.send(@method, '*', '/', File::FNM_PATHNAME).should == false

0 commit comments

Comments
 (0)