diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-20 06:11:20 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-20 06:11:20 +0000 |
commit | e24e1979cb38d809e09effecef9d1efb20a06442 (patch) | |
tree | 35816e6ab9ea0440b7d51841851a0764e9b1b8af /test | |
parent | a848f29e336f4016860a9354b405005321f314fe (diff) |
merge revision(s) 49478,49536,49533,49537: [Backport #10819]
* dir.c (glob_helper): obtain real name with FindFirstFile API
instead of matchin all entries, on Windows.
[ruby-core:67954] [Bug #10819]
* dir.c (has_magic): always get long path name on Windows even if
no tilde is there. [ruby-core:68011] [Bug #10819]
* dir.c (replace_real_basename): FindFirstFile ignore redirection
character, check if exists before call it. cf. [Bug #8597]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_dir.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 6184f05edb..85fdd16dfd 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -248,6 +248,18 @@ class TestDir < Test::Unit::TestCase assert_equal(roots.map {|n| "/..#{n}"}, Dir.glob("/../*"), bug9648) end + if /mswin|mingw/ =~ RUBY_PLATFORM + def test_glob_legacy_short_name + bug10819 = '[ruby-core:67954] [Bug #10819]' + skip unless /\A\w:/ =~ ENV["ProgramFiles"] + short = "#$&/PROGRA~1" + skip unless File.directory?(short) + entries = Dir.glob("#{short}/Common*") + assert_not_empty(entries, bug10819) + assert_equal(Dir.glob("#{File.expand_path(short)}/Common*"), entries, bug10819) + end + end + def test_home env_home = ENV["HOME"] env_logdir = ENV["LOGDIR"] |