File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ function Assert-AreEqualPath {
1010 $ex = & { if ($Expected | Test-Path ) { $Expected | Convert-Path } else {$Expected } }
1111 $pr = & { if ($Presented | Test-Path ) { $Presented | Convert-Path } else {$Presented }}
1212
13+ # trim last '/' if exists
14+ if ($ex.EndsWith (' /' )){ $ex = $ex.Substring (0 , $ex.Length - 1 ) }
15+ if ($pr.EndsWith (' /' )){ $pr = $pr.Substring (0 , $pr.Length - 1 ) }
16+
1317 Assert-AreEqual - Expected $ex - Presented $pr - Comment (" Path not equal - " + $Comment )
1418}
1519
@@ -25,6 +29,10 @@ function Assert-AreNotEqualPath {
2529 $ex = & { if ($Expected | Test-Path ) { $Expected | Convert-Path } else {$Expected } }
2630 $pr = & { if ($Presented | Test-Path ) { $Presented | Convert-Path } else {$Presented }}
2731
32+ # trim last '/' if exists
33+ if ($ex.EndsWith (' /' )){ $ex = $ex.Substring (0 , $ex.Length - 1 ) }
34+ if ($pr.EndsWith (' /' )){ $pr = $pr.Substring (0 , $pr.Length - 1 ) }
35+
2836 Assert-AreNotEqual - Expected $ex - Presented $pr - Comment (" Path equal - " + $Comment )
2937}
3038
You can’t perform that action at this time.
0 commit comments