summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/list/GET-CMP0007-WARN.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-14 09:41:05 -0400
committerBrad King <brad.king@kitware.com>2015-07-14 10:25:38 -0400
commite5ca59b456d3a1a51d0b5387ec9d04a51beaa0be (patch)
tree6166bc6a150f2a319c946e6395fc3636267e7bb6 /Tests/RunCMake/list/GET-CMP0007-WARN.cmake
parent0699e0d3e4305fc4e615c36b831d0171c2f8c757 (diff)
downloadcmake-e5ca59b456d3a1a51d0b5387ec9d04a51beaa0be.tar.gz
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/RunCMake/list/GET-CMP0007-WARN.cmake')
-rw-r--r--Tests/RunCMake/list/GET-CMP0007-WARN.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN.cmake b/Tests/RunCMake/list/GET-CMP0007-WARN.cmake
new file mode 100644
index 0000000000..833f352048
--- /dev/null
+++ b/Tests/RunCMake/list/GET-CMP0007-WARN.cmake
@@ -0,0 +1,7 @@
+cmake_policy(VERSION 2.4)
+set(thelist "" NEW OLD)
+
+list(GET thelist 1 thevalue)
+if (NOT thevalue STREQUAL "OLD")
+ message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'")
+endif()