diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-04 16:42:58 +0200 |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-16 12:00:20 +0200 |
commit | 31675964e7ba37f1412aaa95af4199e9b62e8c08 (patch) | |
tree | 7d53c8bdc2dbed748efa86750fe88358a92f325c /Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in | |
parent | e256e35daa79732a200883cef398fcd0f8227a3d (diff) | |
download | cmake-31675964e7ba37f1412aaa95af4199e9b62e8c08.tar.gz |
GenEx LIST: list operations
Fixes: #24550, #24547
Diffstat (limited to 'Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in')
-rw-r--r-- | Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in b/Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in new file mode 100644 index 0000000000..0d676af60e --- /dev/null +++ b/Tests/RunCMake/GenEx-LIST/POP_FRONT.cmake.in @@ -0,0 +1,18 @@ + +include ("${RunCMake_SOURCE_DIR}/check_errors.cmake") +unset (errors) + +set(listvar a b c d) +list(POP_FRONT listvar) +set (output "$<LIST:POP_FRONT,a;b;c;d>") +if (NOT output STREQUAL listvar) + list (APPEND errors "returns bad value: ${output}") +endif() + +set (output "$<LIST:POP_FRONT,>") +if (NOT output STREQUAL "") + list (APPEND errors "returns bad value: ${output}") +endif() + + +check_errors("LIST:POP_FRONT..." ${errors}) |