summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhogelog <konbu.komuro@gmail.com>2023-11-25 19:14:03 +0900
committergit <svn-admin@ruby-lang.org>2023-11-25 10:14:07 +0000
commit68a03613d8f7ec173addbfbb3989045d8f639ec5 (patch)
tree6dfc5884227c4d65e7abca6f066d82521e7529fa
parent543dd74049f18db2f8dd9ac05b25f8dbff2edc14 (diff)
[ruby/irb] Fix flaky test case
test_autocomplete_with_multiple_doc_namespaces (https://github.com/ruby/irb/pull/786) https://github.com/ruby/irb/commit/85c6ddeb7d
-rw-r--r--test/irb/yamatanooroti/test_rendering.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/irb/yamatanooroti/test_rendering.rb b/test/irb/yamatanooroti/test_rendering.rb
index 5d8719ac3f..f9b4befbf5 100644
--- a/test/irb/yamatanooroti/test_rendering.rb
+++ b/test/irb/yamatanooroti/test_rendering.rb
@@ -207,15 +207,13 @@ class IRB::RenderingTest < Yamatanooroti::TestCase
write_irbrc <<~'LINES'
puts 'start IRB'
LINES
- start_terminal(4, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB')
+ start_terminal(3, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB')
write("{}.__id_")
write("\C-i")
close
- assert_screen(<<~EOC)
- start IRB
- irb(main):001> {}.__id__
- }.__id__
- EOC
+ screen = result.join("\n").sub(/\n*\z/, "\n")
+ # This assertion passes whether showdoc dialog completed or not.
+ assert_match(/start\ IRB\nirb\(main\):001> {}\.__id__\n }\.__id__(?:Press )?/, screen)
end
def test_autocomplete_with_showdoc_in_gaps_on_narrow_screen_right