diff options
Diffstat (limited to 'Tests/CMakeTests/ExecuteScriptTests.cmake')
-rw-r--r-- | Tests/CMakeTests/ExecuteScriptTests.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/CMakeTests/ExecuteScriptTests.cmake b/Tests/CMakeTests/ExecuteScriptTests.cmake index c71585a..bceac33 100644 --- a/Tests/CMakeTests/ExecuteScriptTests.cmake +++ b/Tests/CMakeTests/ExecuteScriptTests.cmake @@ -52,9 +52,9 @@ function(execute_all_script_tests scriptname result) foreach(line ${script}) if(line MATCHES "${regex}") + set(testname "${CMAKE_MATCH_2}") + set(expected_result "${CMAKE_MATCH_3}") math(EXPR count "${count} + 1") - string(REGEX REPLACE "${regex}" "\\2" testname "${line}") - string(REGEX REPLACE "${regex}" "\\3" expected_result "${line}") execute_one_script_test(${scriptname} ${testname} ${expected_result}) endif() endforeach() |