From b06253f5973e09413f8dc3a207d0b479c120e088 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 16 Nov 2012 09:03:49 -0500 Subject: [svn-r23037] Correct string variable handling/reference Tested: local and windows --- config/cmake/runTest.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 2539b94..78ccf9f 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -110,13 +110,13 @@ IF (NOT TEST_SKIP_COMPARE) # now compare the output with the reference SET (TEST_RESULT 0) FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) - LIST (LENGTH test_act len_act) + LIST (LENGTH "${test_act}" len_act) FILE (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) - LIST (LENGTH test_ref len_ref) + LIST (LENGTH "${test_ref}" len_ref) MATH (EXPR _FP_LEN "${len_ref} - 1") FOREACH (line RANGE 0 ${_FP_LEN}) - LIST (GET test_act ${line} str_act) - LIST (GET test_ref ${line} str_ref) + LIST (GET "${test_act}" ${line} str_act) + LIST (GET "${test_ref}" ${line} str_ref) STRING (COMPARE NOTEQUAL ${str_act} ${str_ref} str_res) IF (${str_res}) SET (TEST_RESULT 1) @@ -143,13 +143,13 @@ IF (NOT TEST_SKIP_COMPARE) # now compare the error output with the error reference SET (TEST_RESULT 0) FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) - LIST (LENGTH test_act len_act) + LIST (LENGTH "${test_act}" len_act) FILE (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) - LIST (LENGTH test_ref len_ref) + LIST (LENGTH "${test_ref}" len_ref) MATH (EXPR _FP_LEN "${len_ref} - 1") FOREACH (line RANGE 0 ${_FP_LEN}) - LIST (GET test_act ${line} str_act) - LIST (GET test_ref ${line} str_ref) + LIST (GET "${test_act}" ${line} str_act) + LIST (GET "${test_ref}" ${line} str_ref) STRING (COMPARE NOTEQUAL ${str_act} ${str_ref} str_res) IF (${str_res}) SET (TEST_RESULT 1) -- cgit v0.12