diff --git a/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj b/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
index 975e7757823..1481ead2b16 100644
--- a/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
+++ b/src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/test/powershell/Language/Operators/ReplaceOperator.Tests.ps1 b/test/powershell/Language/Operators/ReplaceOperator.Tests.ps1
index be428d9dbce..c620221d4dd 100644
--- a/test/powershell/Language/Operators/ReplaceOperator.Tests.ps1
+++ b/test/powershell/Language/Operators/ReplaceOperator.Tests.ps1
@@ -5,52 +5,52 @@ Describe "Replace Operator" -Tags CI {
Context "Replace operator" {
It "Replace operator can replace string values using regular expressions" {
$res = "Get-Process" -replace "Get", "Stop"
- $res | Should BeExactly "Stop-Process"
+ $res | Should -BeExactly "Stop-Process"
$res = "image.gif" -replace "\.gif$",".jpg"
- $res | Should BeExactly "image.jpg"
+ $res | Should -BeExactly "image.jpg"
}
It "Replace operator can be case-insensitive and case-sensitive" {
$res = "book" -replace "B","C"
- $res | Should BeExactly "Cook"
+ $res | Should -BeExactly "Cook"
$res = "book" -ireplace "B","C"
- $res | Should BeExactly "Cook"
+ $res | Should -BeExactly "Cook"
$res = "book" -creplace "B","C"
- $res | Should BeExactly "book"
+ $res | Should -BeExactly "book"
}
It "Replace operator can take 2 arguments, a mandatory pattern, and an optional substitution" {
$res = "PowerPoint" -replace "Point","Shell"
- $res | Should BeExactly "PowerShell"
+ $res | Should -BeExactly "PowerShell"
$res = "PowerPoint" -replace "Point"
- $res | Should BeExactly "Power"
+ $res | Should -BeExactly "Power"
}
}
Context "Replace operator substitutions" {
It "Replace operator supports numbered substitution groups using ```$n" {
$res = "domain.example" -replace ".*\.(\w+)$","Tld of '`$0' is - '`$1'"
- $res | Should BeExactly "Tld of 'domain.example' is - 'example'"
+ $res | Should -BeExactly "Tld of 'domain.example' is - 'example'"
}
It "Replace operator supports named substitution groups using ```${name}" {
$res = "domain.example" -replace ".*\.(?\w+)$","`${tld}"
- $res | Should BeExactly "example"
+ $res | Should -BeExactly "example"
}
It "Replace operator can take a ScriptBlock in place of a substitution string" {
- $res = "ID ABC123" -replace "\b[A-C]+", {return "X" * $_[0].Value.Length}
- $res | Should BeExactly "ID XXX123"
+ $res = "ID ABC123" -replace "\b[A-C]+", {return "X" * $_.Value.Length}
+ $res | Should -BeExactly "ID XXX123"
}
It "Replace operator can take a MatchEvaluator in place of a substitution string" {
$matchEvaluator = {return "X" * $args[0].Value.Length} -as [System.Text.RegularExpressions.MatchEvaluator]
$res = "ID ABC123" -replace "\b[A-C]+", $matchEvaluator
- $res | Should BeExactly "ID XXX123"
+ $res | Should -BeExactly "ID XXX123"
}
It "Replace operator can take a static PSMethod in place of a substitution string" {
@@ -61,7 +61,7 @@ Describe "Replace Operator" -Tags CI {
}
$substitutionMethod = [R]::Replace
$res = "ID 0000123" -replace "\b0+", $substitutionMethod
- $res | Should BeExactly "ID XXXX123"
+ $res | Should -BeExactly "ID XXXX123"
}
}
}