From dd0b29e9eac3271e4f50afa8c753a80c6ef628e6 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 22 Jan 2024 17:55:03 +0900 Subject: [PATCH 1/2] Use version dependant library for completion test --- test/irb/test_completion.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 348cd4b6d..2f97d99fa 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -124,8 +124,8 @@ def object.to_s; raise; end end def test_complete_require_library_name_first - candidates = IRB::RegexpCompletor.new.completion_candidates("require ", "'csv", "", bind: binding) - assert_equal "'csv", candidates.first + candidates = IRB::RegexpCompletor.new.completion_candidates("require ", "'coverage", "", bind: binding) + assert_equal "'coverage", candidates.first end def test_complete_require_relative From 937bbd67f801ed1535d96f6d1b925d6d4c6d97fe Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 23 Jan 2024 07:54:54 +0900 Subject: [PATCH 2/2] Fixup 2e69137dbe9fd7c03dac9b8adc30a7eba3ecb10b --- test/irb/test_completion.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 2f97d99fa..4500fedb0 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -124,8 +124,9 @@ def object.to_s; raise; end end def test_complete_require_library_name_first - candidates = IRB::RegexpCompletor.new.completion_candidates("require ", "'coverage", "", bind: binding) - assert_equal "'coverage", candidates.first + # Test that library name is completed first with subdirectories + candidates = IRB::RegexpCompletor.new.completion_candidates("require ", "'rubygems", "", bind: binding) + assert_equal "'rubygems", candidates.first end def test_complete_require_relative