diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-31 03:20:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-31 03:20:22 +0000 |
commit | 8b9cd1dbb2d64a74d553a8e6637dc87a752e5ba1 (patch) | |
tree | 2e1f4b3c94c9de691c5d67da4e215ea97375e44f | |
parent | 92862661371d5a3a5771ece4e1c107ead57c4cd0 (diff) |
test for File#lstat.
* test/ruby/test_file_exhaustive.rb (test_lstat): Add lacking test
for File#lstat. [Fix GH-1231]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 <[email protected]> + + * 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 <[email protected]> * 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+"/...") |