From f5133bec22947ee89a812663d8b2e6d4078c8901 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Wed, 20 Nov 2019 08:53:38 +1000 Subject: [PATCH] Fix up broken Windows test when run with coverage (#65085) --- .../win_csharp_utils/library/ansible_process_tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/targets/win_csharp_utils/library/ansible_process_tests.ps1 b/test/integration/targets/win_csharp_utils/library/ansible_process_tests.ps1 index 9b7b3cb36e7..d906dfc5249 100644 --- a/test/integration/targets/win_csharp_utils/library/ansible_process_tests.ps1 +++ b/test/integration/targets/win_csharp_utils/library/ansible_process_tests.ps1 @@ -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 }