Skip to content

Commit

Permalink
pester example using cults
Browse files Browse the repository at this point in the history
  • Loading branch information
ninmonkey committed Dec 18, 2023
1 parent b3648b8 commit 2782b9d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Pwsh/Testing/ComparingCults.tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
describe 'thing' {
It '<Render> is <Expected>' -foreach @(
@{
In = 1000
Expected = '1,000'
FStr = 'n0'
Cult = 'en-us'
}
@{
In = 1000
Expected = '1,000.00'
FStr = 'n'
Cult = 'en-us'
}
@{
In = 1000
Expected = '1.000,0'
FStr = 'n1'
Cult = 'de-de'
}
) -Test {
$cult = Get-Culture $Cult
$In.ToString($FStr, $Cult) | Should -BeExactly $Expected
}
}

0 comments on commit 2782b9d

Please sign in to comment.