test_rubyoptions.rb: let all tests work with --jit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
acacd7a1d3
commit
6090206275
@ -6,6 +6,13 @@ require 'tempfile'
|
|||||||
require_relative '../lib/jit_support'
|
require_relative '../lib/jit_support'
|
||||||
|
|
||||||
class TestRubyOptions < Test::Unit::TestCase
|
class TestRubyOptions < Test::Unit::TestCase
|
||||||
|
NO_JIT_DESCRIPTION =
|
||||||
|
if RubyVM::MJIT.enabled?
|
||||||
|
RUBY_DESCRIPTION.sub(/\+JIT /, '')
|
||||||
|
else
|
||||||
|
RUBY_DESCRIPTION
|
||||||
|
end
|
||||||
|
|
||||||
def write_file(filename, content)
|
def write_file(filename, content)
|
||||||
File.open(filename, "w") {|f|
|
File.open(filename, "w") {|f|
|
||||||
f << content
|
f << content
|
||||||
@ -109,9 +116,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||||||
def test_verbose
|
def test_verbose
|
||||||
assert_in_out_err(["-vve", ""]) do |r, e|
|
assert_in_out_err(["-vve", ""]) do |r, e|
|
||||||
assert_match(VERSION_PATTERN, r[0])
|
assert_match(VERSION_PATTERN, r[0])
|
||||||
description = RUBY_DESCRIPTION
|
assert_equal(NO_JIT_DESCRIPTION, r[0])
|
||||||
description = description.sub(/\+JIT /, '') if RubyVM::MJIT.enabled?
|
|
||||||
assert_equal(description, r[0])
|
|
||||||
assert_equal([], e)
|
assert_equal([], e)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -637,7 +642,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||||||
-e:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n
|
-e:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n
|
||||||
)x,
|
)x,
|
||||||
%r(
|
%r(
|
||||||
#{ Regexp.quote(RUBY_DESCRIPTION) }\n\n
|
#{ Regexp.quote(NO_JIT_DESCRIPTION) }\n\n
|
||||||
)x,
|
)x,
|
||||||
%r(
|
%r(
|
||||||
(?:--\s(?:.+\n)*\n)?
|
(?:--\s(?:.+\n)*\n)?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user