Function toCoverageLines

Parse the file lines

std.algorithm.iteration.MapResult!(trial.coverage.toCoverageLines(string).__lambda4,std.algorithm.iteration.MapResult!(trial.coverage.toCoverageLines(string).__lambda3,std.algorithm.iteration.FilterResult!(trial.coverage.toCoverageLines(string).__lambda2,string[]).FilterResult).MapResult) toCoverageLines (
  string fileContent
) pure nothrow @safe;

Example

It should convert a .lst file to covered line structs

auto lines =
"      |
     |import std.stdio;
   75|  this(File f) {
     |  }
core/cloud/source/cloud/system.d is 88% covered
".toCoverageLines.array;

lines.length.should.equal(4);

lines[0].code.should.equal("");
lines[0].hits.should.equal(0);
lines[0].hasCode.should.equal(false);

lines[1].code.should.equal("import std.stdio;");
lines[1].hits.should.equal(0);
lines[1].hasCode.should.equal(false);

lines[2].code.should.equal("  this(File f) {");
lines[2].hits.should.equal(75);
lines[2].hasCode.should.equal(true);

lines[3].code.should.equal("  }");
lines[3].hits.should.equal(0);
lines[3].hasCode.should.equal(false);