Commit 2cac68ad authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Merge branch '35368-fix-gcovr-regexp-matching' into 'master'

Fix the gcovr coverage regex by removing line separators before scanning

Closes #35368

See merge request !13025
......@@ -74,6 +74,7 @@
match = ""
reverse_line do |line|
line.chomp!
matches = regex.scan(line)
next unless matches.is_a?(Array)
next if matches.empty?
......
......@@ -300,5 +300,12 @@
include_examples 'malicious regexp'
end
context 'multi-line data with rooted regexp' do
let(:data) { "\n65%\n" }
let(:regex) { '^(\d+)\%$' }
it { is_expected.to eq('65') }
end
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment