1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-03-26 06:24:24 +00:00
parent b6a6fa0af4
commit 94a6df7869

View file

@ -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