summaryrefslogtreecommitdiff
path: root/test/ruby/test_dir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_dir.rb')
-rw-r--r--test/ruby/test_dir.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 78371a096b..edb5210af1 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -641,6 +641,21 @@ class TestDir < Test::Unit::TestCase
assert_equal("C:/ruby/homepath", Dir.home)
end;
end
+
+ def test_children_long_name
+ Dir.mktmpdir do |dirname|
+ longest_possible_component = "b" * 255
+ long_path = File.join(dirname, longest_possible_component)
+ Dir.mkdir(long_path)
+ File.write("#{long_path}/c", "")
+ assert_equal(%w[c], Dir.children(long_path))
+ ensure
+ File.unlink("#{long_path}/c")
+ Dir.rmdir(long_path)
+ end
+ rescue Errno::ENOENT
+ omit "File system does not support long file name"
+ end
end
def test_home