diff options
Diffstat (limited to 'Tests/CMakeTests/ListTest.cmake.in')
-rw-r--r-- | Tests/CMakeTests/ListTest.cmake.in | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/Tests/CMakeTests/ListTest.cmake.in b/Tests/CMakeTests/ListTest.cmake.in index 77c34a9..76f5e4f 100644 --- a/Tests/CMakeTests/ListTest.cmake.in +++ b/Tests/CMakeTests/ListTest.cmake.in @@ -1,8 +1,5 @@ include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake") -include("@CMAKE_CURRENT_SOURCE_DIR@/../RegexEscapeString.cmake") -REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") - macro(TEST command expected) if("x${result}" STREQUAL "x${expected}") #message("TEST \"${command}\" success: \"${result}\" expected: \"${expected}\"") @@ -103,9 +100,6 @@ TEST("REVERSE empty result" "") list(SORT result) TEST("SORT empty result" "") -set(No-Arguments-RESULT 1) -set(No-Arguments-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-No-Arguments.cmake:1 \\(list\\):.*list must be called with at least two arguments.*") - # these trigger top-level condition foreach(cmd IN ITEMS Append Find Get Insert Length Reverse Remove_At Remove_Duplicates Remove_Item Sort) set(${cmd}-No-Arguments-RESULT 1) @@ -132,53 +126,6 @@ foreach(cmd IN ITEMS Find Get Insert Length Remove_At Remove_Item) check_cmake_test_single(List "${cmd}-List-Only" "${_test_file_name}") endforeach() -set(Length-Too-Many-Arguments-RESULT 1) -set(Length-Too-Many-Arguments-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Length-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command LENGTH requires two arguments.*") - -set(Reverse-Too-Many-Arguments-RESULT 1) -set(Reverse-Too-Many-Arguments-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Reverse-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command REVERSE only takes one argument.*") - -set(Remove_Duplicates-Too-Many-Arguments-RESULT 1) -set(Remove_Duplicates-Too-Many-Arguments-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Remove_Duplicates-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command REMOVE_DUPLICATES only takes one argument.*") - -set(Sort-Too-Many-Arguments-RESULT 1) -set(Sort-Too-Many-Arguments-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Sort-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command SORT only takes one argument.*") - -set(Invalid-Subcommand-RESULT 1) -set(Invalid-Subcommand-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Invalid-Subcommand.cmake:1 \\(list\\):.*list does not recognize sub-command NO_SUCH_SUBCOMMAND.*") - -foreach(cmd Get Insert Remove_At) - set(${cmd}-Invalid-Index-RESULT 1) - set(${cmd}-Invalid-Index-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-${cmd}-Invalid-Index.cmake:2 \\(list\\):.*list index: 3 out of range \\(-3, 2\\).*") -endforeach() - -foreach(cmd Remove_Item Reverse Remove_Duplicates Sort Remove_At) - string(TOUPPER ${cmd} Cmd) - set(${cmd}-Nonexistent-List-RESULT 1) - set(${cmd}-Nonexistent-List-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-${cmd}-Nonexistent-List.cmake:2 \\(list\\):.*sub-command ${Cmd} requires list to be present.*") -endforeach() - -set(Get-CMP0007-Warn-RESULT 0) -set(Get-CMP0007-Warn-STDERR ".*CMake Warning \\(dev\\) at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?List-Get-CMP0007-Warn.cmake:3 \\(list\\):.*Policy CMP0007 is not set:.*") - -check_cmake_test(List - No-Arguments - Length-Too-Many-Arguments - Reverse-Too-Many-Arguments - Remove_Duplicates-Too-Many-Arguments - Sort-Too-Many-Arguments - Invalid-Subcommand - Get-Invalid-Index - Insert-Invalid-Index - Remove_Item-Nonexistent-List - Reverse-Nonexistent-List - Remove_Duplicates-Nonexistent-List - Sort-Nonexistent-List - Remove_At-Nonexistent-List - Remove_At-Invalid-Index - Get-CMP0007-Warn -) - set(thelist "" NEW OLD) foreach (_pol ${thelist}) |