diff options
author | st0012 <stan001212@gmail.com> | 2022-10-06 12:37:37 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-10-08 03:17:42 +0900 |
commit | 5b3079a8a5f66859c8d80ad55b5424c7c1877443 (patch) | |
tree | 9da3f022451ecff6973257e7632f52acd59d06b4 /test | |
parent | 7cafe09aec76924eafe3ca46b0265de44930a67e (diff) | |
download | ruby-5b3079a8a5f66859c8d80ad55b5424c7c1877443.tar.gz |
[ruby/irb] Sort constant completion's candidates
https://github.com/ruby/irb/commit/ee9b33c817
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_completion.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 4ca7f298ff..df5a78c69d 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -196,13 +196,14 @@ module TestIRB class TestConstantCompletion < TestCompletion class Foo + B3 = 1 B1 = 1 - B2 = 2 + B2 = 1 end def test_complete_constants assert_equal(["Foo"], IRB::InputCompletor.retrieve_completion_data("Fo", bind: binding)) - assert_equal(["Foo::B1", "Foo::B2"], IRB::InputCompletor.retrieve_completion_data("Foo::B", bind: binding)) + assert_equal(["Foo::B1", "Foo::B2", "Foo::B3"], IRB::InputCompletor.retrieve_completion_data("Foo::B", bind: binding)) assert_equal(["Foo::B1.positive?"], IRB::InputCompletor.retrieve_completion_data("Foo::B1.pos", bind: binding)) assert_equal(["::Forwardable"], IRB::InputCompletor.retrieve_completion_data("::Fo", bind: binding)) |