Skip to content

Commit ffd1f37

Browse files
committed
paths finally
1 parent 32fc6a5 commit ffd1f37

2 files changed

Lines changed: 1 addition & 29 deletions

File tree

src/functions/Coverage.ps1

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -741,34 +741,6 @@ function Get-RelativePath {
741741
return $Path -replace "^$([regex]::Escape("$RelativeTo$([System.IO.Path]::DirectorySeparatorChar)"))?"
742742
}
743743

744-
function Normalize-Path {
745-
[CmdletBinding()]
746-
param (
747-
[Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
748-
[Alias('PSPath', 'FullName')]
749-
[string[]] $Path
750-
)
751-
752-
# Split-Path and Join-Path will replace any AltDirectorySeparatorChar instances with the DirectorySeparatorChar
753-
# (Even if it's not the one that the split / join happens on.) So splitting / rejoining a path will give us
754-
# consistent separators for later string comparison.
755-
756-
process {
757-
if ($null -ne $Path) {
758-
foreach ($p in $Path) {
759-
$normalizedPath = & $SafeCommands['Split-Path'] $p -Leaf
760-
761-
if ($normalizedPath -ne $p) {
762-
$parent = & $SafeCommands['Split-Path'] $p -Parent
763-
$normalizedPath = & $SafeCommands['Join-Path'] $parent $normalizedPath
764-
}
765-
766-
$normalizedPath
767-
}
768-
}
769-
}
770-
}
771-
772744
function Get-JaCoCoReportXml {
773745
param (
774746
[parameter(Mandatory = $true)]

tst/Pester.RSpec.Output.ts.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ i -PassThru:$PassThru {
438438

439439
$uncoveredLine = $output | where { $_ -like "*not covered*" }
440440

441-
$uncoveredLine | Verify-Like 'tst/testProjectsForMissingCoverage/CoverageTestFile.Missing.ps1*not covered*'
441+
$uncoveredLine | Verify-Like ('tst/testProjectsForMissingCoverage/CoverageTestFile.Missing.ps1*not covered*' -replace '/', [System.IO.Path]::DirectorySeparatorChar)
442442
}
443443
}
444444
}

0 commit comments

Comments
 (0)