Skip to content

Commit

Permalink
Add a test that autocompletion returns to the original text
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Sep 9, 2021
1 parent a17de2d commit d80880e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/reline/yamatanooroti/test_rendering.rb
Expand Up @@ -894,6 +894,21 @@ def test_autocomplete_at_bottom
EOC
end

def test_autocomplete_return_to_original
start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
write('S')
write('t')
write('r')
3.times{ write("\C-i") }
close
assert_screen(<<~'EOC')
Multiline REPL.
prompt> Str
String
Struct
EOC
end

def test_autocomplete_target_is_wrapped
start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
write(' ')
Expand Down

0 comments on commit d80880e

Please sign in to comment.