mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-14 05:39:11 +00:00
1 parent
272a5a98f9
commit
ac84c35820
2 files changed
+10
-2
No files matched your search
@@ -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