Skip to content

Commit 3ad0453

Browse files
authored
Wait for each auto-indent update (#918)
Synchronize each input line with its rendered prompt to avoid flaky auto-indent assertions.
1 parent 96241f4 commit 3ad0453

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/reline/yamatanooroti/test_rendering.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ def test_auto_indent
758758
start_terminal(10, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --auto-indent}, startup_message: 'Multiline REPL.')
759759
"def hoge\nputs(\n1,\n2\n)\nend".lines do |line|
760760
write line
761+
assert_screen(/#{Regexp.escape(line.chomp)}\nprompt>/) if line.end_with?("\n")
761762
end
762763
assert_screen(<<~EOC)
763764
Multiline REPL.

0 commit comments

Comments
 (0)