From 912ee94a7d848fdecbb7e6d3aa131a2c78bd728b Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Wed, 15 Jan 2025 14:43:49 -0500 Subject: [PATCH] Check to see if failure is related to nested regex's --- lib/ceedling/preprocessinator_extractor.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ceedling/preprocessinator_extractor.rb b/lib/ceedling/preprocessinator_extractor.rb index d2d6fa2b..72d4458e 100644 --- a/lib/ceedling/preprocessinator_extractor.rb +++ b/lib/ceedling/preprocessinator_extractor.rb @@ -141,11 +141,11 @@ def extract_test_directive_macro_calls(file_contents) # Look for TEST_SOURCE_FILE("...") and TEST_INCLUDE_PATH("...") in a string (i.e. a file's contents as a string) regexes = [ - /(#{PATTERNS::TEST_SOURCE_FILE})/, - /(#{PATTERNS::TEST_INCLUDE_PATH})/ + /TEST_SOURCE_FILE\(\s*\"\s*[^"]+\s*\"\s*\)/, + /TEST_INCLUDE_PATH\(\s*\"\s*[^"]+\s*\"\s*\)/ ] - return extract_tokens_by_regex_list( file_contents, *regexes ).map(&:first) + return extract_tokens_by_regex_list( file_contents, *regexes ) end