diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2016-09-28 19:20:42 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2016-09-28 19:20:42 (GMT) |
commit | 66c70cd9f1eb69b03cefe7fbe8e238aaa4630f47 (patch) | |
tree | 68392c9b8aa273322032e71ea1a4851c25c3ec65 /Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake | |
parent | 41291b20f3881cac781e5e628f8b892b29c7b39c (diff) | |
download | CMake-66c70cd9f1eb69b03cefe7fbe8e238aaa4630f47.zip CMake-66c70cd9f1eb69b03cefe7fbe8e238aaa4630f47.tar.gz CMake-66c70cd9f1eb69b03cefe7fbe8e238aaa4630f47.tar.bz2 |
cmake_parse_arguments: Add additional unit tests
Add additional unit tests for some corner cases in argument splitting.
Diffstat (limited to 'Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake')
-rw-r--r-- | Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake b/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake index 63a1b01..96a373d 100644 --- a/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake @@ -1,15 +1,5 @@ include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) -function(test_multi list) - set(i 0) - foreach(value IN LISTS ${list}) - math(EXPR j "${i} + 1") - set(${list}[${i}] "${value}") - TEST(${list}[${i}] "${ARGV${j}}") - set(i ${j}) - endforeach() -endfunction() - function(test1) cmake_parse_arguments(PARSE_ARGV 0 pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2") @@ -33,7 +23,7 @@ function(test2 arg1) TEST(pref_OPT2 FALSE) TEST(pref_SINGLE1 "foo;bar") TEST(pref_SINGLE2 UNDEFINED) - test_multi(pref_MULTI1 bar "foo;bar") + TEST(pref_MULTI1 bar "foo;bar") TEST(pref_MULTI2 UNDEFINED) TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) endfunction() @@ -43,6 +33,6 @@ function(test3 arg1) cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "") - test_multi(pref_UNPARSED_ARGUMENTS "foo;bar" dog cat) + TEST(pref_UNPARSED_ARGUMENTS "foo;bar" dog cat) endfunction() test3("foo;bar" dog cat) |