summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_dir.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 6184f05..85fdd16 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"]