summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-11-06 23:05:39 (GMT)
committerBrad King <brad.king@kitware.com>2002-11-06 23:05:39 (GMT)
commit6ab16695d066278fe9f78774ec3df3733d932c06 (patch)
treeefe7ecb05c7418013618a8d36577dd41c4d02815 /Tests/Complex/CMakeLists.txt
parent42c464c05e8f79f82babf83909d918bf26317425 (diff)
downloadCMake-6ab16695d066278fe9f78774ec3df3733d932c06.zip
CMake-6ab16695d066278fe9f78774ec3df3733d932c06.tar.gz
CMake-6ab16695d066278fe9f78774ec3df3733d932c06.tar.bz2
BUG: Fixed STRING(REGEX REPLACE ...) and added better test.
Diffstat (limited to 'Tests/Complex/CMakeLists.txt')
-rw-r--r--Tests/Complex/CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index aa4bb4b..af0c5d1 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -221,12 +221,13 @@ STRING(REGEX MATCHALL "b" RESULT "abcb")
IF(NOT RESULT)
MESSAGE(SEND_ERROR "STRING(REGEX MATCHALL ... ) test failed.")
ENDIF(NOT RESULT)
-STRING(REGEX REPLACE "(b)" "[\\1]" RESULT "abcde")
-IF("x${RESULT}" MATCHES "^xa\\[b\\]cde$")
+STRING(REGEX REPLACE ".([bd])." "[\\1]" RESULT "a(b)c(d)e")
+IF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$")
SET(STRING_REGEX_PASSED 1)
-ENDIF("x${RESULT}" MATCHES "^xa\\[b\\]cde$")
+ENDIF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$")
IF(NOT STRING_REGEX_PASSED)
- MESSAGE(SEND_ERROR "STRING(REGEX REPLACE ... ) test failed.")
+ MESSAGE(SEND_ERROR
+ "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
ENDIF(NOT STRING_REGEX_PASSED)
#