Skip to content

Commit

Permalink
Test special characters handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fmang committed Oct 28, 2020
1 parent 78346d1 commit 5c87334
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/powershell_elevated_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
it { should match(/Windows IP Configuration/) }
end

describe 'special characters' do
subject(:output) { elevated_shell.run("echo \"#{text}\"") }
# Sample text using more than ASCII, but still compatible with occidental OEM encodings.
let(:text) { 'Dès Noël, où un zéphyr haï me vêt de glaçons würmiens, je dîne d’exquis rôtis de bœuf au kir, à l’aÿ d’âge mûr, &cætera.' }

it { should have_exit_code 0 }
it { should have_stdout_match "Dès Noël, où un zéphyr haï me vêt de glaçons würmiens, je dîne d'exquis rôtis de bouf au kir, à l'aÿ d'âge mûr, &cætera.\r\n" }
it { should have_no_stderr }
end

describe 'capturing output from Write-Host and Write-Error' do
subject(:output) do
script = <<-COMMAND
Expand Down

0 comments on commit 5c87334

Please sign in to comment.