diff --git a/ChangeLog b/ChangeLog index 916526631a..ff5bfd0d9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 14 16:02:51 2012 NAKAMURA Usaku + + * test/ruby/test_file_exhaustive.rb + (TestFileExhaustive#test_stat_dotted_prefix): added. + Tue Aug 14 15:39:09 2012 NAKAMURA Usaku * 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+"/...")))