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

Merge pull request #550 from jannisbaudisch/fix_test_parameterization_regex

Improve regex for test parameterization to support function pointers
This commit is contained in:
Mark VanderVoord
2023-02-06 15:31:49 -05:00
committed by GitHub
4 changed files with 18 additions and 1 deletions

View File

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