Merge topic 'tests-RunCMake-normalize-newlines'

bf05938b Tests/RunCMake: Normalize newlines before checking actual output
This commit is contained in:
Brad King 2015-01-27 11:22:04 -05:00 committed by CMake Topic Stage
commit 34ce0dd22f
1 changed files with 1 additions and 0 deletions

View File

@ -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} "")