[前][次][番号順一覧][スレッド一覧]

ruby-changes:41626

From: nobu <ko1@a...>
Date: Sun, 31 Jan 2016 12:19:20 +0900 (JST)
Subject: [ruby-changes:41626] nobu:r53700 (trunk): test for File#lstat.

nobu	2016-01-31 12:20:22 +0900 (Sun, 31 Jan 2016)

  New Revision: 53700

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53700

  Log:
    test for File#lstat.
    
    * test/ruby/test_file_exhaustive.rb (test_lstat): Add lacking test
      for File#lstat.  [Fix GH-1231]

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_file_exhaustive.rb
Index: test/ruby/test_file_exhaustive.rb
===================================================================
--- test/ruby/test_file_exhaustive.rb	(revision 53699)
+++ test/ruby/test_file_exhaustive.rb	(revision 53700)
@@ -255,6 +255,16 @@ class TestFileExhaustive < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file_exhaustive.rb#L255
     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+"/...")
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53699)
+++ ChangeLog	(revision 53700)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jan 31 12:19:15 2016  Kuniaki IGARASHI  <igaiga@g...>
+
+	* 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@g...>
 
 	* doc/standard_library.rdoc: fix typo  [Fix GH-1230]

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]