Skip to content

Commit c7fbe53

Browse files
committed
remove windows drive from path
1 parent f326cf2 commit c7fbe53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/coverlet.msbuild.tasks.tests/Reporters.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ public void Msbuild_ReportWriter(string? coverletMultiTargetFrameworksCurrentTFM
4343
new CoverageResult() { Modules = new Modules(), Parameters = new CoverageParameters() }, null);
4444

4545
string path = reportWriter.WriteReport();
46+
//remove drive for windows
47+
if (path.Contains(':'))
48+
{
49+
path = path.Substring(2);
50+
}
4651
// Path.Combine depends on OS so we can change only win side to avoid duplication
4752
Assert.Equal(path.Replace('/', Path.DirectorySeparatorChar), expectedFileName.Replace('/', Path.DirectorySeparatorChar));
4853
}

0 commit comments

Comments
 (0)