mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_dir.rb (TestDir::test_glob): glob file names not sorted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
66054b9e3d
commit
3854be4322
2 changed files with 10 additions and 6 deletions
|
@ -143,13 +143,13 @@ class TestDir < Test::Unit::TestCase
|
|||
def test_glob
|
||||
assert_equal((%w(. ..) + (?a..?z).to_a).map{|f| File.join(@root, f) },
|
||||
Dir.glob(File.join(@root, "*"), File::FNM_DOTMATCH).sort)
|
||||
assert_equal([@root] + (?a..?z).map {|f| File.join(@root, f) },
|
||||
Dir.glob([@root, File.join(@root, "*")]))
|
||||
assert_equal([@root] + (?a..?z).map {|f| File.join(@root, f) },
|
||||
Dir.glob(@root + "\0\0\0" + File.join(@root, "*")))
|
||||
assert_equal([@root] + (?a..?z).map {|f| File.join(@root, f) }.sort,
|
||||
Dir.glob([@root, File.join(@root, "*")]).sort)
|
||||
assert_equal([@root] + (?a..?z).map {|f| File.join(@root, f) }.sort,
|
||||
Dir.glob(@root + "\0\0\0" + File.join(@root, "*")).sort)
|
||||
|
||||
assert_equal((?a..?z).step(2).map {|f| File.join(File.join(@root, f), "") },
|
||||
Dir.glob(File.join(@root, "*/")))
|
||||
assert_equal((?a..?z).step(2).map {|f| File.join(File.join(@root, f), "") }.sort,
|
||||
Dir.glob(File.join(@root, "*/")).sort)
|
||||
|
||||
FileUtils.touch(File.join(@root, "{}"))
|
||||
assert_equal(%w({} a).map{|f| File.join(@root, f) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue