mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
Tests/RunCMake: Add option for dynamic expected output
Add `RunCMake_TEST_EXPECT_*` variables for this.
This commit is contained in:

committed by
Brad King

parent
0ca98beb57
commit
8ba16db163
@@ -47,6 +47,8 @@ function(run_cmake test)
|
|||||||
elseif(EXISTS ${top_src}/${test}-${o}.txt)
|
elseif(EXISTS ${top_src}/${test}-${o}.txt)
|
||||||
file(READ ${top_src}/${test}-${o}.txt expect_${o})
|
file(READ ${top_src}/${test}-${o}.txt expect_${o})
|
||||||
string(REGEX REPLACE "\n+$" "" expect_${o} "${expect_${o}}")
|
string(REGEX REPLACE "\n+$" "" expect_${o} "${expect_${o}}")
|
||||||
|
elseif(DEFINED RunCMake_TEST_EXPECT_${o})
|
||||||
|
string(REGEX REPLACE "\n+$" "" expect_${o} "${RunCMake_TEST_EXPECT_${o}}")
|
||||||
else()
|
else()
|
||||||
unset(expect_${o})
|
unset(expect_${o})
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user