summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-11-16 14:03:49 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-11-16 14:03:49 (GMT)
commitb06253f5973e09413f8dc3a207d0b479c120e088 (patch)
tree3bffb625a27e418b94c93f2b180c760ac71d1325 /config/cmake
parent4e2e8d118c487770ce44f661f84ce0b0b68ef7f2 (diff)
downloadhdf5-b06253f5973e09413f8dc3a207d0b479c120e088.zip
hdf5-b06253f5973e09413f8dc3a207d0b479c120e088.tar.gz
hdf5-b06253f5973e09413f8dc3a207d0b479c120e088.tar.bz2
[svn-r23037] Correct string variable handling/reference
Tested: local and windows
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/runTest.cmake16
1 files 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)