Skip to content

Commit

Permalink
Cleanup linefilter
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Aug 24, 2020
1 parent edaa9fa commit 134f088
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Pester.Runtime.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,7 @@ function Test-ShouldRun {
# in one place and check if parent was included after this one to short circuit the other
# filters in case parent already knows that it will run

# using StartLine property in Item-object for Tests when available to target It startline when using testcases with multiple lines
$line = "$(if ($Item.ScriptBlock.File) { $Item.ScriptBlock.File } else { $Item.ScriptBlock.Id }):$(if($Item.StartLine) { $Item.Startline } else { $Item.ScriptBlock.StartPosition.StartLine })" -replace '\\', '/'
$line = "$(if ($Item.ScriptBlock.File) { $Item.ScriptBlock.File } else { $Item.ScriptBlock.Id }):$($Item.StartLine)" -replace '\\', '/'
if ($lineFilter -and 0 -ne $lineFilter.Count) {
$anyIncludeFilters = $true
foreach ($l in $lineFilter -replace '\\', '/') {
Expand Down

0 comments on commit 134f088

Please sign in to comment.