mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Add a test for pasting Cyrillic chars into command prompt on cp 850
This closes https://github.com/ruby/reline/issues/103.
213e0523d5
This commit is contained in:
parent
b0cc46b484
commit
754bfc66f8
1 changed files with 22 additions and 0 deletions
|
@ -753,6 +753,28 @@ begin
|
||||||
EOC
|
EOC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_cyrillic_chars
|
||||||
|
omit unless Reline::IOGate.win?
|
||||||
|
start_terminal(50, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
|
||||||
|
write("`chcp 850`\n")
|
||||||
|
write("`chcp`\n")
|
||||||
|
write("def гопота; 3; end\n")
|
||||||
|
write("гопота\n")
|
||||||
|
close
|
||||||
|
assert_screen(<<~'EOC')
|
||||||
|
Multiline REPL.
|
||||||
|
prompt> `chcp 850`
|
||||||
|
=> "Active code page: 850\n"
|
||||||
|
prompt> `chcp`
|
||||||
|
=> "Active code page: 850\n"
|
||||||
|
prompt> def гопота; 3; end
|
||||||
|
=> :гопота
|
||||||
|
prompt> гопота
|
||||||
|
=> 3
|
||||||
|
prompt>
|
||||||
|
EOC
|
||||||
|
end
|
||||||
|
|
||||||
private def write_inputrc(content)
|
private def write_inputrc(content)
|
||||||
File.open(@inputrc_file, 'w') do |f|
|
File.open(@inputrc_file, 'w') do |f|
|
||||||
f.write content
|
f.write content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue