diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-14 07:03:18 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-14 07:03:18 +0000 |
commit | 104b5c7810b95741e45b5e01f7c557c96799c13e (patch) | |
tree | f0b8c0120c19227042ddefe253f7e3fb5e20b52a /test | |
parent | b3a4461df2c78b4828cf344789b80e3c3ebedd14 (diff) | |
download | ruby-104b5c7810b95741e45b5e01f7c557c96799c13e.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 58c034c0e0..7467bffdfe 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -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+"/..."))) |