ruby-changes:24644
From: usa <ko1@a...>
Date: Tue, 14 Aug 2012 16:03:31 +0900 (JST)
Subject: [ruby-changes:24644] usa:r36695 (trunk): * test/ruby/test_file_exhaustive.rb
usa 2012-08-14 16:03:18 +0900 (Tue, 14 Aug 2012) New Revision: 36695 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36695 Log: * test/ruby/test_file_exhaustive.rb (TestFileExhaustive#test_stat_dotted_prefix): added. Modified files: trunk/ChangeLog trunk/test/ruby/test_file_exhaustive.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36694) +++ ChangeLog (revision 36695) @@ -1,3 +1,8 @@ +Tue Aug 14 16:02:51 2012 NAKAMURA Usaku <usa@r...> + + * test/ruby/test_file_exhaustive.rb + (TestFileExhaustive#test_stat_dotted_prefix): added. + Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <usa@r...> * test/ruby/test_file_exhaustive.rb Index: test/ruby/test_file_exhaustive.rb =================================================================== --- test/ruby/test_file_exhaustive.rb (revision 36694) +++ test/ruby/test_file_exhaustive.rb (revision 36695) @@ -114,6 +114,20 @@ # 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+"/..."))) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/