From 104b5c7810b95741e45b5e01f7c557c96799c13e Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 14 Aug 2012 07:03:18 +0000 Subject: * test/ruby/test_file_exhaustive.rb (TestFileExhaustive#test_stat_dotted_prefix): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_file_exhaustive.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/ruby/test_file_exhaustive.rb') 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+"/..."))) -- cgit v1.2.3