mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_jit.rb: prettify script in message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
48e4f02fcb
commit
7a0bc1f350
1 changed files with 6 additions and 1 deletions
|
@ -470,7 +470,12 @@ class TestJIT < Test::Unit::TestCase
|
||||||
|
|
||||||
# The shortest way to test one proc
|
# The shortest way to test one proc
|
||||||
def assert_compile_once(script, result_inspect:)
|
def assert_compile_once(script, result_inspect:)
|
||||||
assert_eval_with_jit("p proc { #{script} }.call", stdout: "#{result_inspect}\n", success_count: 1)
|
if script.match?(/\A\n.+\n\z/m)
|
||||||
|
script = script.gsub(/^/, ' ')
|
||||||
|
else
|
||||||
|
script = " #{script} "
|
||||||
|
end
|
||||||
|
assert_eval_with_jit("p proc {#{script}}.call", stdout: "#{result_inspect}\n", success_count: 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Shorthand for normal test cases
|
# Shorthand for normal test cases
|
||||||
|
|
Loading…
Add table
Reference in a new issue