diff --git a/ChangeLog b/ChangeLog index 66d02b9120..916526631a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 14 15:39:09 2012 NAKAMURA Usaku + + * test/ruby/test_file_exhaustive.rb + (TestFileExhaustive#test_stat_drive_root): added. + Tue Aug 14 10:38:17 2012 NARUSE, Yui * lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 434c93c7e2..58c034c0e0 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -106,6 +106,14 @@ class TestFileExhaustive < Test::Unit::TestCase assert_kind_of(File::Stat, File.open(@file) {|f| f.lstat}) end + def test_stat_drive_root + assert_nothing_raised { File.stat(DRIVE + "/") } + assert_nothing_raised { File.stat(DRIVE + "/.") } + assert_nothing_raised { File.stat(DRIVE + "/..") } + assert_raise(Errno::ENOENT) { File.stat(DRIVE + "/...") } + # want to test the root of empty drive, but there is no method to test it... + end if DRIVE + def test_directory_p assert(File.directory?(@dir)) assert(!(File.directory?(@dir+"/...")))