mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
90913bfabe
commit
9339a7d9d4
1 changed files with 37 additions and 0 deletions
37
test/reline/yamatanooroti/test_rendering.rb
Normal file
37
test/reline/yamatanooroti/test_rendering.rb
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
begin
|
||||||
|
require 'yamatanooroti'
|
||||||
|
|
||||||
|
class Yamatanooroti::TestMultiplatform < Yamatanooroti::TestCase
|
||||||
|
def setup
|
||||||
|
inputrc_backup = ENV['INPUTRC']
|
||||||
|
ENV['INPUTRC'] = 'nonexistent_file'
|
||||||
|
start_terminal(5, 30, %w{ruby -Ilib bin/multiline_repl})
|
||||||
|
sleep 0.5
|
||||||
|
ENV['INPUTRC'] = inputrc_backup
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_history_back
|
||||||
|
write(":a\n")
|
||||||
|
write("\C-p")
|
||||||
|
close
|
||||||
|
assert_screen(<<~EOC)
|
||||||
|
Multiline REPL.
|
||||||
|
prompt> :a
|
||||||
|
=> :a
|
||||||
|
prompt> :a
|
||||||
|
EOC
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_backspace
|
||||||
|
write(":abc\C-h\n")
|
||||||
|
close
|
||||||
|
assert_screen(<<~EOC)
|
||||||
|
Multiline REPL.
|
||||||
|
prompt> :ab
|
||||||
|
=> :ab
|
||||||
|
prompt>
|
||||||
|
EOC
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue LoadError, NameError # yamatanooroti gem not found
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue