summaryrefslogtreecommitdiff
path: root/Tests/ArgumentExpansion
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-11 17:10:28 -0500
committerBrad King <brad.king@kitware.com>2011-01-11 17:10:28 -0500
commit729db484efac18194076c4020fe9b6a87f24ed22 (patch)
tree7a38ff11f778e7eb94f0844f563d62b096f03882 /Tests/ArgumentExpansion
parent89c25443a62de7a06fc0daa9f552a70aa9692aa0 (diff)
downloadcmake-729db484efac18194076c4020fe9b6a87f24ed22.tar.gz
Fix ArgumentExpansion test expected results
Teach the ArgumentExpansion test to expect flattened lists as has always been the case in the CMake language. Now that the test should pass enable the failure regex even when CMAKE_STRICT is not on. Replace the reference to the old ArgumentExpansion test behavior in the workaround comment in cmMakefile::TryCompile with a full inline explanation.
Diffstat (limited to 'Tests/ArgumentExpansion')
-rw-r--r--Tests/ArgumentExpansion/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/Tests/ArgumentExpansion/CMakeLists.txt b/Tests/ArgumentExpansion/CMakeLists.txt
index 62017067ac..a24636f58e 100644
--- a/Tests/ArgumentExpansion/CMakeLists.txt
+++ b/Tests/ArgumentExpansion/CMakeLists.txt
@@ -16,11 +16,11 @@ function (argument_tester expected expected_len)
list(GET ARGN ${i} argn_value)
list(GET ${expected} ${i} expected_value)
- if (NOT ${argn_value} STREQUAL ${expected_value})
+ if (NOT "${argn_value}" STREQUAL "${expected_value}")
message(STATUS "Unexpected: Argument ${i} doesn't match")
message(STATUS " Expected: ${expected_value}")
message(STATUS " Received: ${argn_value}")
- endif (NOT ${argn_value} STREQUAL ${expected_value})
+ endif ()
math(EXPR i "${i} + 1")
endwhile (i LESS ${argn_len})
@@ -50,10 +50,11 @@ set(nested_list_arg_test
"${multiple_arg_test}"
"first arg"
"second arg")
-message(STATUS "Test: Nested list argument")
-argument_tester(nested_list_arg_test 3 ${nested_list_arg_test})
+message(STATUS "Test: Nested list argument flattens")
+argument_tester(nested_list_arg_test 4 ${nested_list_arg_test})
set(semicolon_arg_test
"pre\;post")
-message(STATUS "Test: Semicolon argument")
-argument_tester(semicolon_arg_test 1 ${semicolon_arg_test})
+set(semicolon_arg_test_flat "pre;post")
+message(STATUS "Test: Semicolon argument flattens")
+argument_tester(semicolon_arg_test_flat 2 ${semicolon_arg_test})