diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-26 06:24:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-26 06:24:24 +0000 |
commit | 94a6df786926a61c7099fb338ecb208818b31c02 (patch) | |
tree | f149d2b0e3fe349e06532d401b1852ad81f2dc18 | |
parent | b6a6fa0af47f9e1647b17aedc2e4269498b0f086 (diff) | |
download | ruby-94a6df786926a61c7099fb338ecb208818b31c02.tar.gz |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_syntax.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 3dd222fd74..b816a3dfcb 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -3,12 +3,13 @@ require_relative 'envutil' 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 |