Skip to content

Commit

Permalink
Add a test for dialog at right edge
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Sep 9, 2021
1 parent 99640ab commit db64216
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/reline/yamatanooroti/test_rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,25 @@ def test_simple_dialog
EOC
end

def test_simple_dialog_at_right_edge
start_terminal(20, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog simple}, startup_message: 'Multiline REPL.')
write('a')
write('b')
write('c')
write("\C-h")
close
assert_screen(<<~'EOC')
Multiline REPL.
prompt> ab
Ruby is...
A dynamic, open source programming
language with a focus on simplicity
and productivity. It has an elegant
syntax that is natural to read and
easy to write.
EOC
end

def test_simple_dialog_with_scroll_key
start_terminal(20, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog long,scrollkey}, startup_message: 'Multiline REPL.')
write('a')
Expand Down

0 comments on commit db64216

Please sign in to comment.