зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
745ada8649
Коммит
9933a6019f
|
@ -1,3 +1,8 @@
|
|||
Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_file_exhaustive.rb
|
||||
(TestFileExhaustive#test_stat_drive_root): added.
|
||||
|
||||
Tue Aug 14 10:38:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
|
||||
|
|
|
@ -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+"/...")))
|
||||
|
|
Загрузка…
Ссылка в новой задаче