mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 19:44:01 +02:00
[ruby/reline] Add a test that autocompletion returns to the original text
d80880e56b
This commit is contained in:
parent
90f0f22fcc
commit
b00522608f
1 changed files with 15 additions and 0 deletions
|
@ -894,6 +894,21 @@ begin
|
|||
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(' ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue