diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2021-06-23 19:34:59 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2021-07-01 15:12:28 (GMT) |
commit | 7817aa6fa4097a2c642ff1333be72f93a6e32ed1 (patch) | |
tree | a5d46ae281cfa26ba9c2e6fea34fee2d2b77aa98 | |
parent | 5333ee1de4f93996d23fc8f1ae4ba87ad632bc51 (diff) | |
download | CMake-7817aa6fa4097a2c642ff1333be72f93a6e32ed1.zip CMake-7817aa6fa4097a2c642ff1333be72f93a6e32ed1.tar.gz CMake-7817aa6fa4097a2c642ff1333be72f93a6e32ed1.tar.bz2 |
ctest: improve test for runtime labels
Check for the whole expected output string rather than particular substrings.
This verifies that newlines are stripped for any <CTestLabel> lines found
in the test output.
-rw-r--r-- | Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake b/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake index beb39de..eaa50d1 100644 --- a/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake +++ b/Tests/RunCMake/ctest_test/TestExtraLabels-check.cmake @@ -20,9 +20,6 @@ if(NOT n_matches EQUAL 1) endif() # Check test output. -if(NOT _test_contents MATCHES "before") - string(APPEND RunCMake_TEST_FAILED "Could not find expected string 'before' in Test.xml") -endif() -if(NOT _test_contents MATCHES "after") - string(APPEND RunCMake_TEST_FAILED "Could not find expected string 'after' in Test.xml") +if(NOT _test_contents MATCHES "<Value>before\nafter\n</Value>") + string(APPEND RunCMake_TEST_FAILED "Could not find expected output in Test.xml") endif() |