diff options
author | Imir Kiyamov <makketagg@gmail.com> | 2022-07-18 19:45:38 +0300 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-10-05 19:22:13 +0900 |
commit | 83a6213f31016e16bf43613beb4d058339ca9350 (patch) | |
tree | 51cac0156e0346b2ca8591a70043823fdc7a14cc /test/irb | |
parent | 107acbd9a475f74be89e63fbb12c11593692b59f (diff) | |
download | ruby-83a6213f31016e16bf43613beb4d058339ca9350.tar.gz |
[ruby/irb] Fixed sort of variables in completion
https://github.com/ruby/irb/commit/5842888255
Diffstat (limited to 'test/irb')
-rw-r--r-- | test/irb/test_completion.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index fb10870820..8d7476b8f5 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -208,5 +208,16 @@ module TestIRB assert_include(IRB::InputCompletor.retrieve_completion_data("String.new", bind: binding), "String.new") assert_equal(IRB::InputCompletor.retrieve_completion_data("String.new", bind: binding, doc_namespace: true), "String.new") end + + def test_complete_sort_variables + xzy, xzy_1, xzy2 = '', '', '' + + xzy.clear + xzy_1.clear + xzy2.clear + + candidates = IRB::InputCompletor.retrieve_completion_data("xz", bind: binding, doc_namespace: false) + assert_equal(candidates, %w[xzy xzy2 xzy_1]) + end end end |