summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-08 05:07:24 +0900
committergit <svn-admin@ruby-lang.org>2021-09-08 05:23:56 +0900
commitbc24af0f355c71ccc8e57ec95f771fa0737bd27d (patch)
tree8505eb94692543ce1f60701b69fb7e8c5a91ba13 /test/irb
parentc5e8088c7e1c67566f0c2fed0c377c4c8b1990c2 (diff)
[ruby/irb] Show lib name first because it's the most common use case
https://github.com/ruby/irb/commit/74d635758b
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_completion.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index c534301bc6..c3462f4196 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -68,6 +68,11 @@ module TestIRB
end
end
+ def test_complete_require_library_name_first
+ candidates = IRB::InputCompletor::CompletionProc.("'cgi", "require ", "")
+ assert_equal candidates.first, "'cgi"
+ end
+
def test_complete_require_relative
candidates = Dir.chdir(__dir__ + "/../..") do
IRB::InputCompletor::CompletionProc.("'lib/irb", "require_relative ", "")