summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-02-12 19:40:10 +0900
committeraycabta <aycabta@gmail.com>2020-02-12 19:40:10 +0900
commit15cacf1f5588e34f1745790f7405bde845b2ac08 (patch)
treeeb24ef57adfef4864babf23497f22933e3a21be6 /test
parent775e31c801eb954b500e7638cff27cde2210d18d (diff)
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.
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_completion.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index b23f73ea30..f302499fe2 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -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