Skip to content

Commit

Permalink
Add test_complete_symbol
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aycabta committed Feb 12, 2020
1 parent 405a934 commit 4f4cf52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/irb/test_completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def test_complete_numeric
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
Expand Down

0 comments on commit 4f4cf52

Please sign in to comment.