aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_file_exhaustive.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_file_exhaustive.rb')
-rw-r--r--test/ruby/test_file_exhaustive.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 58c034c0e0..7467bffdfe 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -114,6 +114,20 @@ class TestFileExhaustive < Test::Unit::TestCase
# want to test the root of empty drive, but there is no method to test it...
end if DRIVE
+ def test_stat_dotted_prefix
+ Dir.mktmpdir do |dir|
+ prefix = File.join(dir, "...a")
+ Dir.mkdir(prefix)
+ assert File.exist?(prefix)
+
+ assert_nothing_raised { File.stat(prefix) }
+
+ Dir.chdir(dir) do
+ assert_nothing_raised { File.stat(File.basename(prefix)) }
+ end
+ end
+ end if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
+
def test_directory_p
assert(File.directory?(@dir))
assert(!(File.directory?(@dir+"/...")))