ruby-changes:51081
From: k0kubun <ko1@a...>
Date: Sat, 28 Apr 2018 18:11:30 +0900 (JST)
Subject: [ruby-changes:51081] k0kubun:r63288 (trunk): test_rubyoptions.rb: let all tests work with --jit
k0kubun 2018-04-28 18:11:25 +0900 (Sat, 28 Apr 2018) New Revision: 63288 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63288 Log: test_rubyoptions.rb: let all tests work with --jit Modified files: trunk/test/ruby/test_rubyoptions.rb Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 63287) +++ test/ruby/test_rubyoptions.rb (revision 63288) @@ -6,6 +6,13 @@ require 'tempfile' https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L6 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::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L116 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::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L642 -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)? -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/