diff options
author | Brad King <brad.king@kitware.com> | 2015-07-14 13:41:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-14 14:25:38 (GMT) |
commit | e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be (patch) | |
tree | 6166bc6a150f2a319c946e6395fc3636267e7bb6 /Tests/CMakeTests/WhileTest.cmake.in | |
parent | 0699e0d3e4305fc4e615c36b831d0171c2f8c757 (diff) | |
download | CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.zip CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.gz CMake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.bz2 |
Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
Diffstat (limited to 'Tests/CMakeTests/WhileTest.cmake.in')
-rw-r--r-- | Tests/CMakeTests/WhileTest.cmake.in | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Tests/CMakeTests/WhileTest.cmake.in b/Tests/CMakeTests/WhileTest.cmake.in index d4cf7d7..cc22978 100644 --- a/Tests/CMakeTests/WhileTest.cmake.in +++ b/Tests/CMakeTests/WhileTest.cmake.in @@ -1,9 +1,6 @@ set(NUMBERS "") set(COUNT 0) -include("@CMAKE_CURRENT_SOURCE_DIR@/../RegexEscapeString.cmake") -REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") - while(COUNT LESS 200) set(NUMBERS "${NUMBERS} ${COUNT}") set(COUNT "2${COUNT}") @@ -18,40 +15,3 @@ endwhile() if(NOT NUMBERS STREQUAL " 0 3 30 20 3 30") message(SEND_ERROR "while loop nesting error, result: '${NUMBERS}'") endif() - - -set(Missing-Argument-RESULT 1) -set(Missing-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Missing-Argument.cmake:1 \\(while\\):.*while called with incorrect number of arguments.*") - -include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake") -check_cmake_test(While - Missing-Argument -) - -set(Missing-Endwhile-RESULT 1) -set(Missing-Endwhile-STDERR ".*CMake Error in (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Missing-Endwhile.cmake:.*A logical block opening on the line.*(${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Missing-Endwhile.cmake:1 \\(while\\).*is not closed\\..*") - -check_cmake_test(While - Missing-Endwhile -) - -set(Endwhile-Mismatch-RESULT 0) -set(Endwhile-Mismatch-STDERR ".*CMake Warning \\(dev\\) in (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Endwhile-Mismatch.cmake:.*A logical block opening on the line.*(${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Endwhile-Mismatch.cmake:1 \\(while\\).*with mis-matching arguments\\..*") - -check_cmake_test(While - Endwhile-Mismatch -) - -set(Endwhile-Alone-RESULT 1) -set(Endwhile-Alone-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Endwhile-Alone.cmake:1 \\(endwhile\\):.*An ENDWHILE command was found outside of a proper WHILE ENDWHILE.*structure\\.\n.*$") - -check_cmake_test(While - Endwhile-Alone -) - -set(Endwhile-Alone-Args-RESULT 1) -set(Endwhile-Alone-Args-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?While-Endwhile-Alone-Args.cmake:1 \\(endwhile\\):.*An ENDWHILE command was found outside of a proper WHILE ENDWHILE.*structure\\. Or its arguments did not.*$") - -check_cmake_test(While - Endwhile-Alone-Args -) |