mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
@@ -153,7 +153,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
foreach (object item in propertyValueItems)
|
||||
{
|
||||
sb.AppendFormat(CultureInfo.CurrentCulture, $"{item}, ");
|
||||
sb.Append(CultureInfo.CurrentCulture, $"{item}, ");
|
||||
}
|
||||
|
||||
sb = sb.Length > length ? sb.Remove(sb.Length - 2, 2) : sb;
|
||||
@@ -161,7 +161,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat(CultureInfo.CurrentCulture, $"{propValuePropertyValue}, ");
|
||||
sb.Append(CultureInfo.CurrentCulture, $"{propValuePropertyValue}, ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,14 @@ Describe "Group-Object" -Tags "CI" {
|
||||
$result[0].Name | Should -Be ""
|
||||
$result[0].Group | Should -Be '@{X=}'
|
||||
}
|
||||
|
||||
It "Should handle format-like strings with curly braces like normal strings" {
|
||||
$result = '{', '}', '{0}' | Group-Object
|
||||
$result.Count | Should -Be 3
|
||||
$result[0].Name | Should -BeExactly '{'
|
||||
$result[1].Name | Should -BeExactly '{0}'
|
||||
$result[2].Name | Should -BeExactly '}'
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Check 'Culture' parameter in order object cmdlets (Group-Object, Sort-Object, Compare-Object)" -Tags "CI" {
|
||||
|
||||
Reference in New Issue
Block a user