summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-09-30 08:44:18 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-11-02 16:10:07 (GMT)
commit56125a3f363272568c578c7e329af37d97b24df0 (patch)
tree67ce2153f7a25772a9d195f2a316b875ee78580a /Tests/CMakeTests/List-Get-CMP0007-Warn.cmake
parent48ed48f7ad4c2da8037e997129b5ae8923ab7268 (diff)
downloadCMake-56125a3f363272568c578c7e329af37d97b24df0.zip
CMake-56125a3f363272568c578c7e329af37d97b24df0.tar.gz
CMake-56125a3f363272568c578c7e329af37d97b24df0.tar.bz2
list: add tests for CMP0007 behavior
Diffstat (limited to 'Tests/CMakeTests/List-Get-CMP0007-Warn.cmake')
-rw-r--r--Tests/CMakeTests/List-Get-CMP0007-Warn.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake b/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake
new file mode 100644
index 0000000..0a9264f
--- /dev/null
+++ b/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake
@@ -0,0 +1,6 @@
+set(thelist "" NEW OLD)
+
+list(GET thelist 1 thevalue)
+if (NOT thevalue STREQUAL "OLD")
+ message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'")
+endif()