diff --git a/test/powershell/Get-Date.Tests.ps1 b/test/powershell/Get-Date.Tests.ps1 index 584cd129d8..0f481bdae1 100644 --- a/test/powershell/Get-Date.Tests.ps1 +++ b/test/powershell/Get-Date.Tests.ps1 @@ -13,7 +13,8 @@ Describe "Get-Date DRT Unit Tests" -Tags DRT { } It "using -displayhint produces the correct output" { - Get-date -Date:"Jan 1, 2020" -DisplayHint:$([Microsoft.PowerShell.Commands.DisplayHintType]::Date) | Out-String | Should be "`nWednesday, January 1, 2020`n`n`n" + $newLine = [Environment]::NewLine + Get-date -Date:"Jan 1, 2020" -DisplayHint:$([Microsoft.PowerShell.Commands.DisplayHintType]::Date) | Out-String | Should be $newLine"Wednesday, January 1, 2020$newLine$newLine$newLine" } It "using -format produces the correct output" { @@ -32,9 +33,8 @@ Describe "Get-Date DRT Unit Tests" -Tags DRT { Get-date -Date 1/1/0030 -uformat %a%A%b%B%c%C%d%D%e%h%H%I%j%m%M%p%r | Should be "TueTuesdayJanJanuaryTue Jan 1 00:00:00 003000101/01/30 1Jan001210100AM12:00:00 AM" } - It "using -uformat 'StTuUVwWxXyYZ' produces the correct output" { - #ToDo - Get-date -Date 1/1/0030 -uformat %S%T%u%U%V%w%W%x%X%y%Y%Z%% | Should be "0000:00:002012001/01/3000:00:00300030-07%" + It "using -uformat 'StTuUVwWxXyYZ' produces the correct output" { + Get-date -Date 1/1/0030 -uformat %S%T%u%U%V%w%W%x%X%y%Y%% | Should be "0000:00:002012001/01/3000:00:00300030%" } It "Get-date works with pipeline input" {