aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_dir.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-25 06:36:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-25 06:36:18 +0000
commit0ebfc6f216f86a97d766d9ae2b525bd41b50286f (patch)
treef428f3c00df862b09847f9237b7004430e8908f9 /test/ruby/test_dir.rb
parent913943270ddeeed3e7436017bc5976070328f112 (diff)
downloadruby-0ebfc6f216f86a97d766d9ae2b525bd41b50286f.tar.gz
dir.c: replace_real_basename
* dir.c (replace_real_basename): get the real name and replace the base name with it by getattrlist(2) if available. suggested by Matthew Draper at [ruby-core:67116]. [Bug #10015] * dir.c (glob_helper): get the real name of the whole path, not only the last name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_dir.rb')
-rw-r--r--test/ruby/test_dir.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 03c62da547..6184f05edb 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -237,16 +237,8 @@ class TestDir < Test::Unit::TestCase
return unless File.exist?("filewithcases")
assert_equal(%w"FileWithCases", Dir.glob("filewithcases"), feature5994)
end
- Dir.chdir(File.join(@root, "c")) do
- open("FileWithCases", "w") {}
- mode = File.stat(".").mode
- begin
- File.chmod(mode & ~0444, ".")
- return if mode == File.stat(".").mode
- assert_equal(%w"filewithcases", Dir.glob("filewithcases"), feature5994)
- ensure
- File.chmod(mode, ".")
- end
+ Dir.chdir(@root) do
+ assert_equal(%w"a/FileWithCases", Dir.glob("A/filewithcases"), feature5994)
end
end