From a6488f04deba974e556290a84763fe4918ce9660 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 27 Oct 2017 08:40:40 +0000 Subject: Revert "Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]" This reverts commit r60341,r60342,r60344,r60345. Breaking compabitility of the order of result breaks many tests. To avoid such effort to fix tests, the order should be kept. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_dir.rb | 8 ++++---- test/ruby/test_fnmatch.rb | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index a35f7a5c7c..cead4beb93 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -144,8 +144,8 @@ class TestDir < Test::Unit::TestCase assert_equal([File.join(@root, '//a')], Dir.glob(@root + '//a')) FileUtils.touch(File.join(@root, "{}")) - assert_equal(%w(a {}).map{|f| File.join(@root, f) }, - Dir.glob(File.join(@root, '{\{\},a}')).sort) + assert_equal(%w({} a).map{|f| File.join(@root, f) }, + Dir.glob(File.join(@root, '{\{\},a}'))) assert_equal([], Dir.glob(File.join(@root, '['))) assert_equal([], Dir.glob(File.join(@root, '[a-\\'))) @@ -154,8 +154,8 @@ class TestDir < Test::Unit::TestCase open(File.join(@root, "}}{}"), "wb") {} open(File.join(@root, "}}a"), "wb") {} - assert_equal(%w(}}{} }}a).map {|f| File.join(@root, f)}.sort, Dir.glob(File.join(@root, '}}{\{\},a}')).sort) - assert_equal(%w(}}{} }}a b c).map {|f| File.join(@root, f)}.sort, Dir.glob(File.join(@root, '{\}\}{\{\},a},b,c}')).sort) + assert_equal(%w(}}{} }}a).map {|f| File.join(@root, f)}, Dir.glob(File.join(@root, '}}{\{\},a}'))) + assert_equal(%w(}}{} }}a b c).map {|f| File.join(@root, f)}, Dir.glob(File.join(@root, '{\}\}{\{\},a},b,c}'))) end def test_glob_recursive diff --git a/test/ruby/test_fnmatch.rb b/test/ruby/test_fnmatch.rb index 2fb8796ab3..ca01a28698 100644 --- a/test/ruby/test_fnmatch.rb +++ b/test/ruby/test_fnmatch.rb @@ -108,10 +108,6 @@ class TestFnmatch < Test::Unit::TestCase feature5422 = '[ruby-core:40037]' assert_file.for(feature5422).not_fnmatch?( "{.g,t}*", ".gem") assert_file.for(feature5422).fnmatch?("{.g,t}*", ".gem", File::FNM_EXTGLOB) - - assert_file.fnmatch?("{,.}*", ".gem", File::FNM_EXTGLOB) - assert_file.not_fnmatch?("{}*", ".gem", File::FNM_EXTGLOB) - assert_file.not_fnmatch?("{.}*", ".gem") end def test_unmatched_encoding -- cgit v1.2.3