mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-22 15:28:12 +08:00
Merge pull request #399 from frot/master
Allow multi line test-function definitions.
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user