1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add test_complete_symbol

The previous version of the test method used a symbol, ":abcdefg" to complete
but longer symbols that can be completed are defined by other test methods of
other libs.
This commit is contained in:
aycabta 2020-02-12 19:40:10 +09:00
parent 775e31c801
commit 15cacf1f55

View file

@ -26,6 +26,12 @@ module TestIRB
assert_empty(IRB::InputCompletor.retrieve_completion_data("1i.positi", bind: binding))
end
def test_complete_symbol
:aiueo
assert_include(IRB::InputCompletor.retrieve_completion_data(":a", bind: binding), ":aiueo")
assert_empty(IRB::InputCompletor.retrieve_completion_data(":irb_unknown_symbol_abcdefg", bind: binding))
end
def test_complete_symbol_failure
assert_nil(IRB::InputCompletor::PerfectMatchedProc.(":aiueo", bind: binding))
end