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

Allow multi line test-function definitions.

This commit is contained in:
Fredrik Rothamel
2019-03-13 13:41:29 +01:00
parent 8507757c6a
commit 2191b2ba8e

View File

@@ -112,7 +112,7 @@ class UnityTestRunnerGenerator
lines.each_with_index do |line, _index| lines.each_with_index do |line, _index|
# find tests # find tests
next unless line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+((?:#{@options[:test_prefix]}).*)\s*\(\s*(.*)\s*\)/ next unless line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+((?:#{@options[:test_prefix]}).*)\s*\(\s*(.*)\s*\)/m
arguments = Regexp.last_match(1) arguments = Regexp.last_match(1)
name = Regexp.last_match(2) name = Regexp.last_match(2)
call = Regexp.last_match(3) call = Regexp.last_match(3)