summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/CheckCMakeTest.cmake4
-rw-r--r--Tests/CMakeTests/ExecuteScriptTests.cmake4
2 files changed, 4 insertions, 4 deletions
diff --git a/Tests/CMakeTests/CheckCMakeTest.cmake b/Tests/CMakeTests/CheckCMakeTest.cmake
index 7be7b30..1565394 100644
--- a/Tests/CMakeTests/CheckCMakeTest.cmake
+++ b/Tests/CMakeTests/CheckCMakeTest.cmake
@@ -9,8 +9,8 @@ function(check_cmake_test_single prefix test testfile)
ERROR_VARIABLE stderr
RESULT_VARIABLE result
)
- string(REGEX REPLACE "\n" "\n out> " out " out> ${stdout}")
- string(REGEX REPLACE "\n" "\n err> " err " err> ${stderr}")
+ string(REPLACE "\n" "\n out> " out " out> ${stdout}")
+ string(REPLACE "\n" "\n err> " err " err> ${stderr}")
if(NOT "${result}" STREQUAL "${${test}-RESULT}")
message(FATAL_ERROR
"Test ${test} result is [${result}], not [${${test}-RESULT}].\n"
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()