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

ruby-changes:27883

From: nobu <ko1@a...>
Date: Tue, 26 Mar 2013 15:24:33 +0900 (JST)
Subject: [ruby-changes:27883] nobu:r39935 (trunk): test_syntax.rb: pass srcdir

nobu	2013-03-26 15:24:24 +0900 (Tue, 26 Mar 2013)

  New Revision: 39935

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

  Log:
    test_syntax.rb: pass srcdir
    
    * test/ruby/test_syntax.rb (test_syntax): need to pass the source
      directory, __FILE__ in assert_separately is '-' because the code is
      passed via a pipe.  and this test can't finish in 10 seconds.

  Modified files:
    trunk/test/ruby/test_syntax.rb

Index: test/ruby/test_syntax.rb
===================================================================
--- test/ruby/test_syntax.rb	(revision 39934)
+++ test/ruby/test_syntax.rb	(revision 39935)
@@ -3,12 +3,13 @@ require_relative 'envutil' https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L3
 
 class TestSyntax < Test::Unit::TestCase
   def test_syntax
-    assert_separately %W[--disable-gem -r#{__dir__}/envutil], __FILE__, __LINE__, <<-'eom'
-    assert_nothing_raised(Exception) do
-      for script in Dir[File.expand_path("../../../{lib,sample,ext,test}/**/*.rb", __FILE__)].sort
+    srcdir = File.expand_path("../../..", __FILE__)
+    assert_separately(%W[--disable-gem -r#{__dir__}/envutil - #{srcdir}],
+                      __FILE__, __LINE__, <<-eom, timeout: Float::INFINITY)
+      dir = ARGV.shift
+      for script in Dir["#{dir}/{lib,sample,ext,test}/**/*.rb"].sort
         assert_valid_syntax(IO::read(script), script)
       end
-    end
     eom
   end
 

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

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