From bf05938b8f186c397c918c1cf8bd9ce853c86123 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 26 Jan 2015 13:41:38 -0500 Subject: [PATCH] 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. --- Tests/RunCMake/RunCMake.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 23f2f97ec..33b745dc8 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} "")