Skip to content

Commit 85c6dde

Browse files
authored
Fix flaky test case test_autocomplete_with_multiple_doc_namespaces (#786)
1 parent d42138c commit 85c6dde

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/irb/yamatanooroti/test_rendering.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,13 @@ def test_autocomplete_with_multiple_doc_namespaces
207207
write_irbrc <<~'LINES'
208208
puts 'start IRB'
209209
LINES
210-
start_terminal(4, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB')
210+
start_terminal(3, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB')
211211
write("{}.__id_")
212212
write("\C-i")
213213
close
214-
assert_screen(<<~EOC)
215-
start IRB
216-
irb(main):001> {}.__id__
217-
}.__id__
218-
EOC
214+
screen = result.join("\n").sub(/\n*\z/, "\n")
215+
# This assertion passes whether showdoc dialog completed or not.
216+
assert_match(/start\ IRB\nirb\(main\):001> {}\.__id__\n }\.__id__(?:Press )?/, screen)
219217
end
220218

221219
def test_autocomplete_with_showdoc_in_gaps_on_narrow_screen_right

0 commit comments

Comments
 (0)