Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Adds spec for directories with glob patterns #138

Merged
merged 1 commit into from

2 participants

@alindeman
  • Dir.[] and Dir.glob should be able to match these special directories. Passes under MRI, but currently fails under JRuby: jruby/jruby#172
@alindeman alindeman Adds spec for directories with glob patterns
* Dir.[] and Dir.glob should be able to match these special directories.
  Passes under MRI, but currently fails under JRuby:
  jruby/jruby#172
66926ef
@dbussink dbussink merged commit 976d310 into rubyspec:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 20, 2012
  1. @alindeman

    Adds spec for directories with glob patterns

    alindeman authored
    * Dir.[] and Dir.glob should be able to match these special directories.
      Passes under MRI, but currently fails under JRuby:
      jruby/jruby#172
This page is out of date. Refresh to see the latest.
View
2  core/dir/fixtures/common.rb
@@ -80,6 +80,8 @@ def self.mock_dir_files
special/]
special/{
special/}
+
+ special/test{1}/file[1]
]
platform_is_not :windows do
View
2  core/dir/glob_spec.rb
@@ -67,6 +67,7 @@
deeply/nested/directory/structure/
dir/
special/
+ special/test{1}/
subdir_one/
subdir_two/
]
@@ -87,6 +88,7 @@
./deeply/nested/directory/structure/
./dir/
./special/
+ ./special/test{1}/
./subdir_one/
./subdir_two/
]
View
7 core/dir/shared/glob.rb
@@ -102,6 +102,10 @@
Dir.send(@method, 'special/\}').should == ['special/}']
end
+ it "matches paths with glob patterns" do
+ Dir.send(@method, 'special/test\{1\}/*').should == ['special/test{1}/file[1]']
+ end
+
it "matches dotfiles with '.*'" do
Dir.send(@method, '.*').sort.should == %w|. .. .dotfile .dotsubdir|.sort
end
@@ -160,6 +164,7 @@
deeply/nested/directory/structure/
dir/
special/
+ special/test{1}/
subdir_one/
subdir_two/
]
@@ -251,6 +256,8 @@
nondotfile
+ special/test{1}/file[1]
+
subdir_one/nondotfile
subdir_two/nondotfile
subdir_two/nondotfile.ext]
Something went wrong with that request. Please try again.