* 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:
usa 2012-08-14 06:39:46 +00:00
Родитель 745ada8649
Коммит 9933a6019f
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -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+"/...")))