diff options
author | Brad King <brad.king@kitware.com> | 2015-01-26 18:41:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-27 16:18:36 (GMT) |
commit | bf05938b8f186c397c918c1cf8bd9ce853c86123 (patch) | |
tree | a595d934b7ad3d6f19196bd4bea2b9df84dee41d | |
parent | 23bf98fc04eccc85f216fdab4166107c3d958d43 (diff) | |
download | CMake-bf05938b8f186c397c918c1cf8bd9ce853c86123.zip CMake-bf05938b8f186c397c918c1cf8bd9ce853c86123.tar.gz CMake-bf05938b8f186c397c918c1cf8bd9ce853c86123.tar.bz2 |
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.
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 23f2f97..33b745d 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -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} "") |