include ("${RunCMake_SOURCE_DIR}/check_errors.cmake") unset (errors) set(listvar a b c d) list(INSERT listvar 1 e) set (output "$") if (NOT output STREQUAL listvar) list (APPEND errors "returns bad value: ${output}") endif() set(listvar a b c d) list(INSERT listvar 2 e f) set (output "$") if (NOT output STREQUAL listvar) list (APPEND errors "returns bad value: ${output}") endif() set(listvar a b c d) list(INSERT listvar 0 e f) set (output "$") if (NOT output STREQUAL listvar) list (APPEND errors "returns bad value: ${output}") endif() set(listvar a b c d) list(INSERT listvar -2 e f) set (output "$") if (NOT output STREQUAL listvar) list (APPEND errors "returns bad value: ${output}") endif() set(listvar a b c d) list(INSERT listvar 3 e f) set (output "$") if (NOT output STREQUAL listvar) list (APPEND errors "returns bad value: ${output}") endif() unset(listvar) list(INSERT listvar 0 e f) set (output "$") if (NOT output STREQUAL listvar) list (APPEND errors "returns bad value: ${output}") endif() check_errors("LIST:INSERT..." ${errors})