Fix up broken Windows test when run with coverage (#65085)

pull/65086/head
Jordan Borean 5 years ago committed by GitHub
parent 765b054f15
commit f5133bec22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -219,8 +219,9 @@ $tests = @{
}
"CreateProcess with unicode and us-ascii encoding" = {
$actual = [Ansible.Process.ProcessUtil]::CreateProcess($null, "cmd.exe /c echo 💩 café", $null, $null, '', 'us-ascii')
$actual.StandardOut | Assert-Equals -Expected "???? caf??`r`n"
$poop = [System.Char]::ConvertFromUtf32(0xE05A) # Coverage breaks due to script parsing encoding issues with unicode chars, just use the code point instead
$actual = [Ansible.Process.ProcessUtil]::CreateProcess($null, "cmd.exe /c echo $poop café", $null, $null, '', 'us-ascii')
$actual.StandardOut | Assert-Equals -Expected "??? caf??`r`n"
$actual.StandardError | Assert-Equals -Expected ""
$actual.ExitCode | Assert-Equals -Expected 0
}

Loading…
Cancel
Save