summaryrefslogtreecommitdiff
path: root/spec/ruby/core/dir/glob_spec.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-26 20:48:21 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-26 20:48:21 +0000
commit9245e097ecf201f0f5eaeff307b1403d97c2318b (patch)
tree849596b8af99adbef2ecff5d769928b33d3e5048 /spec/ruby/core/dir/glob_spec.rb
parent6c2b58986508b82896eefeaf195be0aa506eaa45 (diff)
Update to ruby/spec@a585ec3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/dir/glob_spec.rb')
-rw-r--r--spec/ruby/core/dir/glob_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/core/dir/glob_spec.rb b/spec/ruby/core/dir/glob_spec.rb
index c5edcc35d5..4b437b0e24 100644
--- a/spec/ruby/core/dir/glob_spec.rb
+++ b/spec/ruby/core/dir/glob_spec.rb
@@ -122,6 +122,18 @@ describe "Dir.glob" do
Dir.glob('**/**/**').empty?.should == false
end
+ it "handles simple filename patterns" do
+ Dir.glob('.dotfile').should == ['.dotfile']
+ end
+
+ it "handles simple directory patterns" do
+ Dir.glob('.dotsubdir/').should == ['.dotsubdir/']
+ end
+
+ it "handles simple directory patterns applied to non-directories" do
+ Dir.glob('nondotfile/').should == []
+ end
+
platform_is_not(:windows) do
it "matches the literal character '\\' with option File::FNM_NOESCAPE" do
Dir.mkdir 'foo?bar'