mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
parent
40ab77eb3d
commit
7e0f5df2f9
Notes:
git
2023-09-04 01:31:46 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
2 changed files with 14 additions and 1 deletions
|
@ -181,6 +181,18 @@ class TestCoverage < Test::Unit::TestCase
|
|||
end;
|
||||
end
|
||||
|
||||
def test_eval_coverage_repeated
|
||||
assert_in_out_err(%w[-rcoverage], <<-"end;", ["[3]"], [])
|
||||
Coverage.start(eval: true, lines: true)
|
||||
|
||||
3.times do
|
||||
eval("Object.new", nil, "test.rb")
|
||||
end
|
||||
|
||||
p Coverage.result["test.rb"][:lines]
|
||||
end;
|
||||
end
|
||||
|
||||
def test_coverage_supported
|
||||
assert Coverage.supported?(:lines)
|
||||
assert Coverage.supported?(:oneshot_lines)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue