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

ruby-changes:38065

From: nobu <ko1@a...>
Date: Wed, 1 Apr 2015 16:53:27 +0900 (JST)
Subject: [ruby-changes:38065] nobu:r50146 (trunk): test_dir.rb: recursive globbing

nobu	2015-04-01 16:53:16 +0900 (Wed, 01 Apr 2015)

  New Revision: 50146

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

  Log:
    test_dir.rb: recursive globbing
    
    * test/ruby/test_dir.rb (test_symlink): add an assertion for
      recursive globbing.

  Modified files:
    trunk/test/ruby/test_dir.rb
Index: test/ruby/test_dir.rb
===================================================================
--- test/ruby/test_dir.rb	(revision 50145)
+++ test/ruby/test_dir.rb	(revision 50146)
@@ -231,7 +231,8 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L231
     assert_equal([*?a..?z, *"symlink-a".."symlink-z"].each_slice(2).map {|f, _| File.join(@root, f + "/") }.sort,
 		 Dir.glob(File.join(@root, "*/")).sort)
 
-    Dir.glob(File.join(@root, "**/"))
+    assert_equal([@root + "/", *[*?a..?z].each_slice(2).map {|f, _| File.join(@root, f + "/") }.sort],
+                 Dir.glob(File.join(@root, "**/")).sort)
   end
 
   def test_glob_metachar

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

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