diff options
Diffstat (limited to 'Tests/StringFileTest')
-rw-r--r-- | Tests/StringFileTest/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index f1598d7..f2789e6 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -217,3 +217,22 @@ TEST_RANGE("3;5" "3;4;5") TEST_RANGE("5;3" "5;4;3") TEST_RANGE("3;10;2" "3;5;7;9") TEST_RANGE("10;0;-3" "10;7;4;1") + +# Test FOREACH IN signature +set(list1 "" a "") +set(list2 a "" b) +set(var_) +set(var_a) +set(var_b) +foreach(item IN LISTS list1 list2 ITEMS "" a "") + set(var_${item} "${var_${item}}x") +endforeach(item) +if(NOT "${var_}" STREQUAL "xxxxx") + message(FATAL_ERROR "count incorrect for \"\": [${var_}]") +endif() +if(NOT "${var_a}" STREQUAL "xxx") + message(FATAL_ERROR "count incorrect for \"a\": [${var_a}]") +endif() +if(NOT "${var_b}" STREQUAL "x") + message(FATAL_ERROR "count incorrect \"b\": [${var_b}]") +endif() |