Skip to content

Commit

Permalink
remove windows drive from path
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertk committed Feb 9, 2024
1 parent f326cf2 commit c7fbe53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/coverlet.msbuild.tasks.tests/Reporters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public void Msbuild_ReportWriter(string? coverletMultiTargetFrameworksCurrentTFM
new CoverageResult() { Modules = new Modules(), Parameters = new CoverageParameters() }, null);

string path = reportWriter.WriteReport();
//remove drive for windows
if (path.Contains(':'))
{
path = path.Substring(2);
}
// Path.Combine depends on OS so we can change only win side to avoid duplication
Assert.Equal(path.Replace('/', Path.DirectorySeparatorChar), expectedFileName.Replace('/', Path.DirectorySeparatorChar));
}
Expand Down

0 comments on commit c7fbe53

Please sign in to comment.