1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_file_exhaustive.rb

(TestFileExhaustive#test_stat_dotted_prefix): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-08-14 07:03:18 +00:00
parent b3a4461df2
commit 104b5c7810
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Aug 14 16:02:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_file_exhaustive.rb
(TestFileExhaustive#test_stat_dotted_prefix): added.
Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_file_exhaustive.rb

View file

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