summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/ListTest.cmake.in
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-15 13:25:06 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-15 13:25:06 (GMT)
commit3b92585cf088d2d316755b77e51a13b4c0173b8b (patch)
treeb865a7477b34b705336efd3f01b5273c21e528d8 /Tests/CMakeTests/ListTest.cmake.in
parent52a6524dbf10aa3e47c1abe70daf34c978f66770 (diff)
downloadCMake-3b92585cf088d2d316755b77e51a13b4c0173b8b.zip
CMake-3b92585cf088d2d316755b77e51a13b4c0173b8b.tar.gz
CMake-3b92585cf088d2d316755b77e51a13b4c0173b8b.tar.bz2
ENH: Remove some errors, fix append to work on nonexisting lists
Diffstat (limited to 'Tests/CMakeTests/ListTest.cmake.in')
-rw-r--r--Tests/CMakeTests/ListTest.cmake.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/Tests/CMakeTests/ListTest.cmake.in b/Tests/CMakeTests/ListTest.cmake.in
index 48b157c..d1e8c2b 100644
--- a/Tests/CMakeTests/ListTest.cmake.in
+++ b/Tests/CMakeTests/ListTest.cmake.in
@@ -13,6 +13,9 @@ TEST("LENGTH mylist result" "4")
LIST(LENGTH "mylist" result)
TEST("LENGTH \"mylist\" result" "4")
+LIST(LENGTH "nonexiting_list1" result)
+TEST("LENGTH \"nonexiting_list1\" result" "0")
+
LIST(GET mylist 3 2 1 0 result)
TEST("GET mylist 3 2 1 0 result" "brad;ken;bill;andy")
@@ -29,9 +32,16 @@ TEST("GET mylist -1 -2 -3 -4 result" "brad;ken;bill;andy")
LIST(GET mylist -1 2 -3 0 result)
TEST("GET mylist -1 2 -3 0 ${result}" "brad;ken;bill;andy")
+LIST(GET "nonexiting_list2" 1 result)
+TEST("GET \"nonexiting_list2\" 1 result" "NOTFOUND")
+
SET(result andy)
-LIST(SET result brad)
-TEST("SET result brad" "andy;brad")
+LIST(APPEND result brad)
+TEST("APPEND result brad" "andy;brad")
+
+LIST(APPEND "nonexiting_list3" brad)
+SET(result "${nonexiting_list3}")
+TEST("APPEND \"nonexiting_list1\" brad" "brad")
SET(result andy brad)
LIST(INSERT result -1 bill ken)