diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-06-17 18:03:49 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-06-17 18:03:49 (GMT) |
commit | aa53857f59578258e780eb71eb0b4165c71276c5 (patch) | |
tree | 0e53a6e4d50aa8db0ea14e2034d4f7c6a12d4bec /Source/CTest/cmCTestTestHandler.cxx | |
parent | ebe5eba1a08b5841188ab7fba875dd69fc58290e (diff) | |
download | CMake-aa53857f59578258e780eb71eb0b4165c71276c5.zip CMake-aa53857f59578258e780eb71eb0b4165c71276c5.tar.gz CMake-aa53857f59578258e780eb71eb0b4165c71276c5.tar.bz2 |
BUG: fix for bug 7136
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 7a3086e..fe3c3ae 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1554,11 +1554,15 @@ std::string cmCTestTestHandler::GenerateRegressionImages( SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" SPACE_REGEX "*>([^<]*)</DartMeasurement>"); - cmsys::RegularExpression cdatameasurement( + cmsys::RegularExpression cdatastart( "<DartMeasurement" SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" - SPACE_REGEX "*>(<!\\[CDATA\\[([^]]*\\]?[^]]+)*]]>)</DartMeasurement>"); + SPACE_REGEX "*>" + SPACE_REGEX "*<!\\[CDATA\\["); + cmsys::RegularExpression cdataend( + "]]>" + SPACE_REGEX "*</DartMeasurement>"); cmsys::RegularExpression measurementfile( "<DartMeasurementFile" SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" @@ -1618,20 +1622,20 @@ std::string cmCTestTestHandler::GenerateRegressionImages( cxml.erase(fourattributes.start(), fourattributes.end() - fourattributes.start()); } - else if ( cdatameasurement.find(cxml) ) + else if ( cdatastart.find(cxml) && cdataend.find(cxml) ) { ostr << "\t\t\t<NamedMeasurement" - << " " << cdatameasurement.match(1) << "=\"" - << cdatameasurement.match(2) << "\"" - << " " << cdatameasurement.match(3) << "=\"" - << cdatameasurement.match(4) << "\"" - << "><Value>" << cdatameasurement.match(5) - << "</Value></NamedMeasurement>" + << " " << cdatastart.match(1) << "=\"" + << cdatastart.match(2) << "\"" + << " " << cdatastart.match(3) << "=\"" + << cdatastart.match(4) << "\"" + << "><Value><![CDATA[" + << cxml.substr(cdatastart.end(), cdataend.start() - cdatastart.end()) + << "]]></Value></NamedMeasurement>" << std::endl; - - cxml.erase(cdatameasurement.start(), - cdatameasurement.end() - cdatameasurement.start()); + cxml.erase(cdatastart.start(), + cdataend.end() - cdatastart.start()); } else if ( measurementfile.find(cxml) ) { |