diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-28 09:11:25 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-28 09:11:25 +0000 |
commit | 6090206275c28975a0f2405c8cf6b281a33337f3 (patch) | |
tree | 8fcb1ce6bd221d08e698b5a4de66720d441c3928 | |
parent | acacd7a1d3f383fcbdad0bc3151c9aaabb8779c9 (diff) |
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
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index b7c9d93540..39ed2a7d76 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -6,6 +6,13 @@ require 'tempfile' require_relative '../lib/jit_support' 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) File.open(filename, "w") {|f| f << content @@ -109,9 +116,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_verbose assert_in_out_err(["-vve", ""]) do |r, e| assert_match(VERSION_PATTERN, r[0]) - description = RUBY_DESCRIPTION - description = description.sub(/\+JIT /, '') if RubyVM::MJIT.enabled? - assert_equal(description, r[0]) + assert_equal(NO_JIT_DESCRIPTION, r[0]) assert_equal([], e) end @@ -637,7 +642,7 @@ class TestRubyOptions < Test::Unit::TestCase -e:(?:1:)?\s\[BUG\]\sSegmentation\sfault.*\n )x, %r( - #{ Regexp.quote(RUBY_DESCRIPTION) }\n\n + #{ Regexp.quote(NO_JIT_DESCRIPTION) }\n\n )x, %r( (?:--\s(?:.+\n)*\n)? |