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 /test | |
parent | 92862661371d5a3a5771ece4e1c107ead57c4cd0 (diff) | |
download | ruby-8b9cd1dbb2d64a74d553a8e6637dc87a752e5ba1.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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+"/...") |