Skip to content

Commit d80880e

Browse files
committed
Add a test that autocompletion returns to the original text
1 parent a17de2d commit d80880e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/reline/yamatanooroti/test_rendering.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,21 @@ def test_autocomplete_at_bottom
894894
EOC
895895
end
896896

897+
def test_autocomplete_return_to_original
898+
start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
899+
write('S')
900+
write('t')
901+
write('r')
902+
3.times{ write("\C-i") }
903+
close
904+
assert_screen(<<~'EOC')
905+
Multiline REPL.
906+
prompt> Str
907+
String
908+
Struct
909+
EOC
910+
end
911+
897912
def test_autocomplete_target_is_wrapped
898913
start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
899914
write(' ')

0 commit comments

Comments
 (0)