Skip to content

Commit 6710793

Browse files
committed
Add a spec for entry matching when base dir specified.
1 parent 0f97297 commit 6710793

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/ruby/core/dir/shared/glob.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@
205205
Dir.send(@method, '**/').sort.should == expected
206206
end
207207

208+
it "recursively matches any subdirectories except './' or '../' with '**/' from the base directory if that is specified" do
209+
expected = %w[
210+
nested/directory
211+
]
212+
213+
Dir.send(@method, '**/*ory', base: 'deeply').sort.should == expected
214+
end
215+
208216
ruby_version_is ''...'3.1' do
209217
it "recursively matches any subdirectories including ./ and ../ with '.**/'" do
210218
Dir.chdir("#{DirSpecs.mock_dir}/subdir_one") do

0 commit comments

Comments
 (0)