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

ruby-changes:29230

From: nobu <ko1@a...>
Date: Thu, 13 Jun 2013 22:03:40 +0900 (JST)
Subject: [ruby-changes:29230] nobu:r41282 (trunk): test_fileutils.rb: parents option

nobu	2013-06-13 22:03:30 +0900 (Thu, 13 Jun 2013)

  New Revision: 41282

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41282

  Log:
    test_fileutils.rb: parents option
    
    * test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir): add
      assertions for parents option.

  Modified files:
    trunk/test/fileutils/test_fileutils.rb

Index: test/fileutils/test_fileutils.rb
===================================================================
--- test/fileutils/test_fileutils.rb	(revision 41281)
+++ test/fileutils/test_fileutils.rb	(revision 41282)
@@ -1233,6 +1233,14 @@ class TestFileUtils https://github.com/ruby/ruby/blob/trunk/test/fileutils/test_fileutils.rb#L1233
         rmdir '/'
       }
     end
+
+    subdir = 'data/sub/dir'
+    mkdir_p(subdir)
+    assert_nothing_raised(Errno::ENOENT) {
+      rmdir(subdir, parents: true)
+    }
+    assert_file_not_exist('data/sub')
+    assert_directory('data')
   end
 
   def test_rmtree

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

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