зеркало из https://github.com/github/ruby.git
[ruby/reline] Add autoindent test for indent after bracket and newline
https://github.com/ruby/reline/commit/3f3da7d0e2
This commit is contained in:
Родитель
4241b3cf2d
Коммит
76e3d853ab
|
@ -1400,6 +1400,18 @@ begin
|
|||
EOC
|
||||
end
|
||||
|
||||
def test_bracket_newline_indent
|
||||
start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --auto-indent}, startup_message: 'Multiline REPL.')
|
||||
write("[\n")
|
||||
write("1")
|
||||
close
|
||||
assert_screen(<<~EOC)
|
||||
Multiline REPL.
|
||||
prompt> [
|
||||
prompt> 1
|
||||
EOC
|
||||
end
|
||||
|
||||
def write_inputrc(content)
|
||||
File.open(@inputrc_file, 'w') do |f|
|
||||
f.write content
|
||||
|
|
Загрузка…
Ссылка в новой задаче