mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
Tests/RunCMake: Normalize newlines before checking actual output
We read the expected output with file(STRINGS) which converts CRLF newlines to LF. Do the same with the actual output before comparing.
This commit is contained in:
@@ -79,6 +79,7 @@ function(run_cmake test)
|
||||
set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n")
|
||||
endif()
|
||||
foreach(o out err)
|
||||
string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}")
|
||||
string(REGEX REPLACE "(^|\n)(==[0-9]+==[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}")
|
||||
string(REGEX REPLACE "\n+$" "" actual_std${o} "${actual_std${o}}")
|
||||
set(expect_${o} "")
|
||||
|
||||
Reference in New Issue
Block a user