aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 08:40:40 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 08:40:40 +0000
commita6488f04deba974e556290a84763fe4918ce9660 (patch)
tree141815125461f7534900695d60736953337ce545 /test
parent04dc3a0ca655011fc775d58a7bd933b8ed644ef7 (diff)
downloadruby-a6488f04deba974e556290a84763fe4918ce9660.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_dir.rb8
-rw-r--r--test/ruby/test_fnmatch.rb4
2 files changed, 4 insertions, 8 deletions
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