summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-14 13:41:05 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-14 14:25:38 (GMT)
commite5ca59b456d3a1a51d0b5387ec9d04a51beaa0be (patch)
tree6166bc6a150f2a319c946e6395fc3636267e7bb6 /Tests/CMakeTests
parent0699e0d3e4305fc4e615c36b831d0171c2f8c757 (diff)
downloadCMake-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')
-rw-r--r--Tests/CMakeTests/GetProperty-Bad-Argument.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Bad-Directory.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Bad-Scope.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Bad-Target.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Bad-Test.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Global-Name.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Missing-Argument.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-No-Cache.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-No-Property.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-No-Source.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-No-Target.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-No-Test.cmake1
-rw-r--r--Tests/CMakeTests/GetProperty-Variable-Name.cmake1
-rw-r--r--Tests/CMakeTests/GetPropertyTest.cmake.in96
-rw-r--r--Tests/CMakeTests/If-Invalid-Argument.cmake2
-rw-r--r--Tests/CMakeTests/IfTest.cmake.in11
-rw-r--r--Tests/CMakeTests/List-Get-CMP0007-Warn.cmake6
-rw-r--r--Tests/CMakeTests/List-Get-Invalid-Index.cmake2
-rw-r--r--Tests/CMakeTests/List-Insert-Invalid-Index.cmake2
-rw-r--r--Tests/CMakeTests/List-Invalid-Subcommand.cmake1
-rw-r--r--Tests/CMakeTests/List-Length-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-No-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake2
-rw-r--r--Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Remove_Duplicates-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Reverse-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/List-Sort-Nonexistent-List.cmake2
-rw-r--r--Tests/CMakeTests/List-Sort-Too-Many-Arguments.cmake1
-rw-r--r--Tests/CMakeTests/ListTest.cmake.in53
-rw-r--r--Tests/CMakeTests/While-Endwhile-Alone-Args.cmake1
-rw-r--r--Tests/CMakeTests/While-Endwhile-Alone.cmake1
-rw-r--r--Tests/CMakeTests/While-Endwhile-Mismatch.cmake2
-rw-r--r--Tests/CMakeTests/While-Missing-Argument.cmake1
-rw-r--r--Tests/CMakeTests/While-Missing-Endwhile.cmake1
-rw-r--r--Tests/CMakeTests/WhileTest.cmake.in40
38 files changed, 0 insertions, 249 deletions
diff --git a/Tests/CMakeTests/GetProperty-Bad-Argument.cmake b/Tests/CMakeTests/GetProperty-Bad-Argument.cmake
deleted file mode 100644
index 382dabb..0000000
--- a/Tests/CMakeTests/GetProperty-Bad-Argument.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO GLOBAL PROPERTY FOO FOO)
diff --git a/Tests/CMakeTests/GetProperty-Bad-Directory.cmake b/Tests/CMakeTests/GetProperty-Bad-Directory.cmake
deleted file mode 100644
index cdbfa80..0000000
--- a/Tests/CMakeTests/GetProperty-Bad-Directory.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO DIRECTORY NonExistentSubDir PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-Bad-Scope.cmake b/Tests/CMakeTests/GetProperty-Bad-Scope.cmake
deleted file mode 100644
index ea8566b..0000000
--- a/Tests/CMakeTests/GetProperty-Bad-Scope.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO FOO FOO)
diff --git a/Tests/CMakeTests/GetProperty-Bad-Target.cmake b/Tests/CMakeTests/GetProperty-Bad-Target.cmake
deleted file mode 100644
index 9992dab..0000000
--- a/Tests/CMakeTests/GetProperty-Bad-Target.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO TARGET FOO PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-Bad-Test.cmake b/Tests/CMakeTests/GetProperty-Bad-Test.cmake
deleted file mode 100644
index 44bf3eb..0000000
--- a/Tests/CMakeTests/GetProperty-Bad-Test.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO TEST FOO PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-Global-Name.cmake b/Tests/CMakeTests/GetProperty-Global-Name.cmake
deleted file mode 100644
index 497700c..0000000
--- a/Tests/CMakeTests/GetProperty-Global-Name.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO GLOBAL FOO PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-Missing-Argument.cmake b/Tests/CMakeTests/GetProperty-Missing-Argument.cmake
deleted file mode 100644
index f0d004d..0000000
--- a/Tests/CMakeTests/GetProperty-Missing-Argument.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property()
diff --git a/Tests/CMakeTests/GetProperty-No-Cache.cmake b/Tests/CMakeTests/GetProperty-No-Cache.cmake
deleted file mode 100644
index 9719fe7..0000000
--- a/Tests/CMakeTests/GetProperty-No-Cache.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO CACHE PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-No-Property.cmake b/Tests/CMakeTests/GetProperty-No-Property.cmake
deleted file mode 100644
index bee230d..0000000
--- a/Tests/CMakeTests/GetProperty-No-Property.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO GLOBAL PROPERTY)
diff --git a/Tests/CMakeTests/GetProperty-No-Source.cmake b/Tests/CMakeTests/GetProperty-No-Source.cmake
deleted file mode 100644
index 89773c8..0000000
--- a/Tests/CMakeTests/GetProperty-No-Source.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO SOURCE PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-No-Target.cmake b/Tests/CMakeTests/GetProperty-No-Target.cmake
deleted file mode 100644
index 8f1fa23..0000000
--- a/Tests/CMakeTests/GetProperty-No-Target.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO TARGET PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-No-Test.cmake b/Tests/CMakeTests/GetProperty-No-Test.cmake
deleted file mode 100644
index 045bd56..0000000
--- a/Tests/CMakeTests/GetProperty-No-Test.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO TEST PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetProperty-Variable-Name.cmake b/Tests/CMakeTests/GetProperty-Variable-Name.cmake
deleted file mode 100644
index 9190f80..0000000
--- a/Tests/CMakeTests/GetProperty-Variable-Name.cmake
+++ /dev/null
@@ -1 +0,0 @@
-get_property(FOO VARIABLE FOO PROPERTY FOO)
diff --git a/Tests/CMakeTests/GetPropertyTest.cmake.in b/Tests/CMakeTests/GetPropertyTest.cmake.in
index e99193e..1ad8956 100644
--- a/Tests/CMakeTests/GetPropertyTest.cmake.in
+++ b/Tests/CMakeTests/GetPropertyTest.cmake.in
@@ -1,5 +1,3 @@
-include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
-
get_property(FOO_BRIEF GLOBAL PROPERTY FOO BRIEF_DOCS)
get_property(FOO_FULL GLOBAL PROPERTY FOO FULL_DOCS)
@@ -16,97 +14,3 @@ get_property(result VARIABLE PROPERTY test_var)
if(NOT result STREQUAL "alpha")
message(SEND_ERROR "bad value of VARIABLE PROPERTY test_var: got '${result}' instead of 'alpha'")
endif()
-
-include("@CMAKE_CURRENT_SOURCE_DIR@/../RegexEscapeString.cmake")
-REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
-
-set(Missing-Argument-RESULT 1)
-set(Missing-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Missing-Argument.cmake:1 \\(get_property\\):.*get_property called with incorrect number of arguments.*")
-
-check_cmake_test(GetProperty
- Missing-Argument
-)
-
-set(Bad-Scope-RESULT 1)
-set(Bad-Scope-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Scope.cmake:1 \\(get_property\\):.*get_property given invalid scope FOO\\..*")
-
-check_cmake_test(GetProperty
- Bad-Scope
-)
-
-set(Bad-Argument-RESULT 1)
-set(Bad-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Argument.cmake:1 \\(get_property\\):.*get_property given invalid argument \"FOO\"\\..*")
-
-check_cmake_test(GetProperty
- Bad-Argument
-)
-
-set(No-Property-RESULT 1)
-set(No-Property-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Property.cmake:1 \\(get_property\\):.*get_property not given a PROPERTY <name> argument\\..*")
-
-check_cmake_test(GetProperty
- No-Property
-)
-
-set(Global-Name-RESULT 1)
-set(Global-Name-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Global-Name.cmake:1 \\(get_property\\):.*get_property given name for GLOBAL scope\\..*")
-
-check_cmake_test(GetProperty
- Global-Name
-)
-
-set(Bad-Directory-RESULT 1)
-set(Bad-Directory-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Directory.cmake:1 \\(get_property\\):.*get_property DIRECTORY scope provided but requested directory was not.*found\\..*")
-
-check_cmake_test(GetProperty
- Bad-Directory
-)
-
-set(No-Target-RESULT 1)
-set(No-Target-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Target.cmake:1 \\(get_property\\):.*get_property not given name for TARGET scope\\..*")
-
-check_cmake_test(GetProperty
- No-Target
-)
-
-set(Bad-Target-RESULT 1)
-set(Bad-Target-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Target.cmake:1 \\(get_property\\):.*get_property could not find TARGET FOO\\..*")
-
-check_cmake_test(GetProperty
- Bad-Target
-)
-
-set(No-Source-RESULT 1)
-set(No-Source-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Source.cmake:1 \\(get_property\\):.*get_property not given name for SOURCE scope\\..*")
-
-check_cmake_test(GetProperty
- No-Source
-)
-
-set(No-Test-RESULT 1)
-set(No-Test-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Test.cmake:1 \\(get_property\\):.*get_property not given name for TEST scope\\..*")
-
-check_cmake_test(GetProperty
- No-Test
-)
-
-set(Bad-Test-RESULT 1)
-set(Bad-Test-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Bad-Test.cmake:1 \\(get_property\\):.*get_property given TEST name that does not exist: FOO.*")
-
-check_cmake_test(GetProperty
- Bad-Test
-)
-
-set(Variable-Name-RESULT 1)
-set(Variable-Name-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-Variable-Name.cmake:1 \\(get_property\\):.*get_property given name for VARIABLE scope\\..*")
-
-check_cmake_test(GetProperty
- Variable-Name
-)
-
-set(No-Cache-RESULT 1)
-set(No-Cache-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?GetProperty-No-Cache.cmake:1 \\(get_property\\):.*get_property not given name for CACHE scope\\..*")
-
-check_cmake_test(GetProperty
- No-Cache
-)
diff --git a/Tests/CMakeTests/If-Invalid-Argument.cmake b/Tests/CMakeTests/If-Invalid-Argument.cmake
deleted file mode 100644
index b4fb97f..0000000
--- a/Tests/CMakeTests/If-Invalid-Argument.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-if (NOT foo bar STREQUAL "foo bar")
-endif()
diff --git a/Tests/CMakeTests/IfTest.cmake.in b/Tests/CMakeTests/IfTest.cmake.in
index 74b8e32..e5211b4 100644
--- a/Tests/CMakeTests/IfTest.cmake.in
+++ b/Tests/CMakeTests/IfTest.cmake.in
@@ -7,9 +7,6 @@ foreach(_arg "" 0 1 2 ${TRUE_NAMES} ${FALSE_NAMES})
set(VAR_${_arg} "${_arg}")
endforeach()
-include("@CMAKE_CURRENT_SOURCE_DIR@/../RegexEscapeString.cmake")
-REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
-
macro(test_vars _old)
# Variables set to false or not set.
foreach(_var "" 0 ${FALSE_NAMES} UNDEFINED)
@@ -159,11 +156,3 @@ foreach(_bad 2x -2x)
endforeach()
test_vars("")
-
-set(Invalid-Argument-RESULT 1)
-set(Invalid-Argument-STDERR ".*CMake Error at (${CTEST_ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/)?If-Invalid-Argument.cmake:1 \\(if\\):.*Unknown arguments specified.*")
-
-include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
-check_cmake_test(If
- Invalid-Argument
-)
diff --git a/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake b/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake
deleted file mode 100644
index 0a9264f..0000000
--- a/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-set(thelist "" NEW OLD)
-
-list(GET thelist 1 thevalue)
-if (NOT thevalue STREQUAL "OLD")
- message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'")
-endif()
diff --git a/Tests/CMakeTests/List-Get-Invalid-Index.cmake b/Tests/CMakeTests/List-Get-Invalid-Index.cmake
deleted file mode 100644
index 178295a..0000000
--- a/Tests/CMakeTests/List-Get-Invalid-Index.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-set(mylist alpha bravo charlie)
-list(GET mylist 3 result)
diff --git a/Tests/CMakeTests/List-Insert-Invalid-Index.cmake b/Tests/CMakeTests/List-Insert-Invalid-Index.cmake
deleted file mode 100644
index 4103d97..0000000
--- a/Tests/CMakeTests/List-Insert-Invalid-Index.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-set(mylist alpha bravo charlie)
-list(INSERT mylist 3 delta)
diff --git a/Tests/CMakeTests/List-Invalid-Subcommand.cmake b/Tests/CMakeTests/List-Invalid-Subcommand.cmake
deleted file mode 100644
index f35a118..0000000
--- a/Tests/CMakeTests/List-Invalid-Subcommand.cmake
+++ /dev/null
@@ -1 +0,0 @@
-list(NO_SUCH_SUBCOMMAND mylist)
diff --git a/Tests/CMakeTests/List-Length-Too-Many-Arguments.cmake b/Tests/CMakeTests/List-Length-Too-Many-Arguments.cmake
deleted file mode 100644
index 327db6a..0000000
--- a/Tests/CMakeTests/List-Length-Too-Many-Arguments.cmake
+++ /dev/null
@@ -1 +0,0 @@
-list(LENGTH mylist result one_too_many)
diff --git a/Tests/CMakeTests/List-No-Arguments.cmake b/Tests/CMakeTests/List-No-Arguments.cmake
deleted file mode 100644
index 7916aaa..0000000
--- a/Tests/CMakeTests/List-No-Arguments.cmake
+++ /dev/null
@@ -1 +0,0 @@
-list()
diff --git a/Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake b/Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake
deleted file mode 100644
index d4f3921..0000000
--- a/Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-set(mylist alpha bravo charlie)
-list(REMOVE_AT mylist 3)
diff --git a/Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake b/Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake
deleted file mode 100644
index 5266c7f..0000000
--- a/Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-unset(nosuchlist)
-list(REMOVE_AT nosuchlist 0)
diff --git a/Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake b/Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake
deleted file mode 100644
index 218f227..0000000
--- a/Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-unset(nosuchlist)
-list(REMOVE_DUPLICATES nosuchlist)
diff --git a/Tests/CMakeTests/List-Remove_Duplicates-Too-Many-Arguments.cmake b/Tests/CMakeTests/List-Remove_Duplicates-Too-Many-Arguments.cmake
deleted file mode 100644
index b5eb46e..0000000
--- a/Tests/CMakeTests/List-Remove_Duplicates-Too-Many-Arguments.cmake
+++ /dev/null
@@ -1 +0,0 @@
-list(REMOVE_DUPLICATES mylist one_too_many)
diff --git a/Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake b/Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake
deleted file mode 100644
index 079e7fb..0000000
--- a/Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-unset(nosuchlist)
-list(REMOVE_ITEM nosuchlist alpha)
diff --git a/Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake b/Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake
deleted file mode 100644
index 977e2cc..0000000
--- a/Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-unset(nosuchlist)
-list(REVERSE nosuchlist)
diff --git a/Tests/CMakeTests/List-Reverse-Too-Many-Arguments.cmake b/Tests/CMakeTests/List-Reverse-Too-Many-Arguments.cmake
deleted file mode 100644
index 3a554a0..0000000
--- a/Tests/CMakeTests/List-Reverse-Too-Many-Arguments.cmake
+++ /dev/null
@@ -1 +0,0 @@
-list(REVERSE mylist one_too_many)
diff --git a/Tests/CMakeTests/List-Sort-Nonexistent-List.cmake b/Tests/CMakeTests/List-Sort-Nonexistent-List.cmake
deleted file mode 100644
index 8f48e10..0000000
--- a/Tests/CMakeTests/List-Sort-Nonexistent-List.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-unset(nosuchlist)
-list(SORT nosuchlist)
diff --git a/Tests/CMakeTests/List-Sort-Too-Many-Arguments.cmake b/Tests/CMakeTests/List-Sort-Too-Many-Arguments.cmake
deleted file mode 100644
index 81b195d..0000000
--- a/Tests/CMakeTests/List-Sort-Too-Many-Arguments.cmake
+++ /dev/null
@@ -1 +0,0 @@
-list(SORT mylist one_too_many)
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})
diff --git a/Tests/CMakeTests/While-Endwhile-Alone-Args.cmake b/Tests/CMakeTests/While-Endwhile-Alone-Args.cmake
deleted file mode 100644
index 886d98c..0000000
--- a/Tests/CMakeTests/While-Endwhile-Alone-Args.cmake
+++ /dev/null
@@ -1 +0,0 @@
-endwhile(a)
diff --git a/Tests/CMakeTests/While-Endwhile-Alone.cmake b/Tests/CMakeTests/While-Endwhile-Alone.cmake
deleted file mode 100644
index 82c09a0..0000000
--- a/Tests/CMakeTests/While-Endwhile-Alone.cmake
+++ /dev/null
@@ -1 +0,0 @@
-endwhile()
diff --git a/Tests/CMakeTests/While-Endwhile-Mismatch.cmake b/Tests/CMakeTests/While-Endwhile-Mismatch.cmake
deleted file mode 100644
index 5c338d6..0000000
--- a/Tests/CMakeTests/While-Endwhile-Mismatch.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-while(a)
-endwhile(b)
diff --git a/Tests/CMakeTests/While-Missing-Argument.cmake b/Tests/CMakeTests/While-Missing-Argument.cmake
deleted file mode 100644
index 32eaa26..0000000
--- a/Tests/CMakeTests/While-Missing-Argument.cmake
+++ /dev/null
@@ -1 +0,0 @@
-while()
diff --git a/Tests/CMakeTests/While-Missing-Endwhile.cmake b/Tests/CMakeTests/While-Missing-Endwhile.cmake
deleted file mode 100644
index 1abaaaf..0000000
--- a/Tests/CMakeTests/While-Missing-Endwhile.cmake
+++ /dev/null
@@ -1 +0,0 @@
-while(a)
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
-)