diff options
Diffstat (limited to 'test/irb/test_completion.rb')
-rw-r--r-- | test/irb/test_completion.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index a16ee5b079..e259428d76 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -14,11 +14,15 @@ module TestIRB class TestMethodCompletion < TestCompletion def test_complete_string assert_include(IRB::InputCompletor.retrieve_completion_data("'foo'.up", bind: binding), "'foo'.upcase") + # completing 'foo bar'.up + assert_include(IRB::InputCompletor.retrieve_completion_data("bar'.up", bind: binding), "bar'.upcase") assert_equal("String.upcase", IRB::InputCompletor.retrieve_completion_data("'foo'.upcase", bind: binding, doc_namespace: true)) end def test_complete_regexp assert_include(IRB::InputCompletor.retrieve_completion_data("/foo/.ma", bind: binding), "/foo/.match") + # completing /foo bar/.ma + assert_include(IRB::InputCompletor.retrieve_completion_data("bar/.ma", bind: binding), "bar/.match") assert_equal("Regexp.match", IRB::InputCompletor.retrieve_completion_data("/foo/.match", bind: binding, doc_namespace: true)) end |