1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Fix bug #288 - invalid line numbers on partial name matches

This commit is contained in:
Mark VanderVoord
2017-09-11 15:39:17 -04:00
parent bdd4cb19d6
commit f278c18fd9

View File

@@ -119,7 +119,7 @@ class UnityTestRunnerGenerator
source_index = 0
tests_and_line_numbers.size.times do |i|
source_lines[source_index..-1].each_with_index do |line, index|
next unless line =~ /#{tests_and_line_numbers[i][:test]}/
next unless line =~ /\s+#{tests_and_line_numbers[i][:test]}(?:\s|\()/
source_index += index
tests_and_line_numbers[i][:line_number] = source_index + 1
break