diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 10 |
2 files changed, 15 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sun Jan 31 12:19:15 2016 Kuniaki IGARASHI <igaiga@gmail.com> + + * test/ruby/test_file_exhaustive.rb (test_lstat): Add lacking test + for File#lstat. [Fix GH-1231] + Sun Jan 31 12:15:33 2016 Prayag Verma <prayag.verma@gmail.com> * doc/standard_library.rdoc: fix typo [Fix GH-1230] diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 6611b92bb8..9fe86816f9 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -255,6 +255,16 @@ class TestFileExhaustive < Test::Unit::TestCase end end if NTFS + def test_lstat + return unless symlinkfile + assert_equal(false, File.stat(symlinkfile).symlink?) + assert_equal(true, File.lstat(symlinkfile).symlink?) + f = File.new(symlinkfile) + assert_equal(false, f.stat.symlink?) + assert_equal(true, f.lstat.symlink?) + f.close + end + def test_directory_p assert_file.directory?(@dir) assert_file.not_directory?(@dir+"/...") |