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

ruby-changes:41788

From: nobu <ko1@a...>
Date: Thu, 18 Feb 2016 00:16:11 +0900 (JST)
Subject: [ruby-changes:41788] nobu:r53862 (trunk): test_dir.rb: Dir.empty? with directories

nobu	2016-02-18 00:16:37 +0900 (Thu, 18 Feb 2016)

  New Revision: 53862

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

  Log:
    test_dir.rb: Dir.empty? with directories
    
    * test/ruby/test_dir.rb (test_empty): check with directories.

  Modified files:
    trunk/test/ruby/test_dir.rb
Index: test/ruby/test_dir.rb
===================================================================
--- test/ruby/test_dir.rb	(revision 53861)
+++ test/ruby/test_dir.rb	(revision 53862)
@@ -342,6 +342,10 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L342
       assert_not_send([Dir, :empty?, a])
       File.delete(tmp)
       assert_send([Dir, :empty?, a])
+      Dir.mkdir(tmp)
+      assert_not_send([Dir, :empty?, a])
+      Dir.rmdir(tmp)
+      assert_send([Dir, :empty?, a])
     end
     assert_raise(Errno::ENOENT) {Dir.empty?(@nodir)}
     assert_not_send([Dir, :empty?, File.join(@root, "b")])

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

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