Skip to content

Commit

Permalink
add integration tests for codepage
Browse files Browse the repository at this point in the history
  • Loading branch information
mwrock committed Oct 7, 2016
1 parent b9b372b commit 0fc28f4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/cmd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@
it { should have_no_stderr }
end

describe 'codepage' do
let(:options) { Hash.new }
let(:shell) { winrm_connection.shell(:cmd, options) }

after { shell.close }

subject(:output) { shell.run('chcp') }

it 'should default to UTF-8 (65001)' do
should have_stdout_match(/Active code page: 65001/)
end

context 'when changing the codepage' do
let(:options) { { codepage: 437 } }

it 'sets the codepage to the one given' do
should have_stdout_match(/Active code page: 437/)
end
end
end

describe 'echo \'hello world\' using apostrophes' do
subject(:output) { @cmd_shell.run("echo 'hello world'") }
it { should have_exit_code 0 }
Expand Down

0 comments on commit 0fc28f4

Please sign in to comment.