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

ruby-changes:38057

From: nobu <ko1@a...>
Date: Tue, 31 Mar 2015 15:32:22 +0900 (JST)
Subject: [ruby-changes:38057] nobu:r50138 (trunk): test_dir.rb: test_entries

nobu	2015-03-31 15:32:18 +0900 (Tue, 31 Mar 2015)

  New Revision: 50138

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

  Log:
    test_dir.rb: test_entries
    
    * test/ruby/test_dir.rb (test_entries): test for Dir#entries.

  Modified files:
    trunk/test/ruby/test_dir.rb
Index: test/ruby/test_dir.rb
===================================================================
--- test/ruby/test_dir.rb	(revision 50137)
+++ test/ruby/test_dir.rb	(revision 50138)
@@ -178,6 +178,11 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L178
     end
   end
 
+  def test_entries
+    entries = Dir.open(@root) {|dir| dir.entries}
+    assert_equal(%w(. ..) + (?a..?z).to_a, entries.sort)
+  end
+
   def test_foreach
     assert_equal(%w(. ..) + (?a..?z).to_a, Dir.foreach(@root).to_a.sort)
   end

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

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