summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJoseph Snyder <joe.snyder@kitware.com>2014-08-15 14:50:36 (GMT)
committerJoseph Snyder <joe.snyder@kitware.com>2014-08-15 14:50:36 (GMT)
commit6d66e396a1b534e7f13a8e4be83820c5a06d0265 (patch)
tree7224cd88b38ce95e7c3f8ba2b50e2a34e40fa58d /Source
parent1c7089924e6240a1af6e50c097023f5898687733 (diff)
downloadCMake-6d66e396a1b534e7f13a8e4be83820c5a06d0265.zip
CMake-6d66e396a1b534e7f13a8e4be83820c5a06d0265.tar.gz
CMake-6d66e396a1b534e7f13a8e4be83820c5a06d0265.tar.bz2
CTEST: Fix MUMPS file parser and update test
The current file parser for a MUMPS routine uses a period "." as the one of the signals that a line of MUMPS code is executable. This is not a correct assumption. Add the period to the list of characters that CTest will not consider the start of a line of code. Update the test routine to have an entry point with code to match the scenario mentioned above.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmParseMumpsCoverage.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx
index 6236211..225e704 100644
--- a/Source/CTest/cmParseMumpsCoverage.cxx
+++ b/Source/CTest/cmParseMumpsCoverage.cxx
@@ -96,11 +96,13 @@ void cmParseMumpsCoverage::InitializeMumpsFile(std::string& file)
}
if(found)
{
- // (2) If the first character found above is whitespace then continue the
- // search for the first following non-whitespace character.
+ // (2) If the first character found above is whitespace or a period
+ // then continue the search for the first following non-whitespace
+ // character.
if(line[i] == ' ' || line[i] == '\t')
{
- while(i < line.size() && (line[i] == ' ' || line[i] == '\t'))
+ while(i < line.size() && (line[i] == ' ' || line[i] == '\t'
+ || line[i] == '.'))
{
i++;
}