diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/irb/test_completion.rb | 7 | ||||
| -rw-r--r-- | test/irb/yamatanooroti/test_rendering.rb | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 0625c96976..348cd4b6dc 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -204,6 +204,13 @@ module TestIRB end end + def test_not_completing_empty_string + assert_equal([], completion_candidates("", binding)) + assert_equal([], completion_candidates(" ", binding)) + assert_equal([], completion_candidates("\t", binding)) + assert_equal(nil, doc_namespace("", binding)) + end + def test_complete_symbol symbols = %w"UTF-16LE UTF-7".map do |enc| "K".force_encoding(enc).to_sym diff --git a/test/irb/yamatanooroti/test_rendering.rb b/test/irb/yamatanooroti/test_rendering.rb index a53dc83ac7..f698466e49 100644 --- a/test/irb/yamatanooroti/test_rendering.rb +++ b/test/irb/yamatanooroti/test_rendering.rb @@ -232,7 +232,8 @@ class IRB::RenderingTest < Yamatanooroti::TestCase puts 'start IRB' LINES start_terminal(4, 19, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB') - write("IR\C-i") + write("IR") + write("\C-i") close # This is because on macOS we display different shortcut for displaying the full doc @@ -268,7 +269,8 @@ class IRB::RenderingTest < Yamatanooroti::TestCase puts 'start IRB' LINES start_terminal(4, 12, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb}, startup_message: 'start IRB') - write("IR\C-i") + write("IR") + write("\C-i") close assert_screen(<<~EOC) start IRB |
