diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-14 06:39:46 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-14 06:39:46 +0000 |
commit | 9933a6019f8e867a546723e983e0a50593d35cbd (patch) | |
tree | 589b476f3a63c2567afe864b2c4d108d9c4a7b9a | |
parent | 745ada86498cd80cf93610dd8d6d6b95f61ac327 (diff) |
* test/ruby/test_file_exhaustive.rb
(TestFileExhaustive#test_stat_drive_root): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <[email protected]> + + * test/ruby/test_file_exhaustive.rb + (TestFileExhaustive#test_stat_drive_root): added. + Tue Aug 14 10:38:17 2012 NARUSE, Yui <[email protected]> * 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+"/..."))) |