ruby-changes:60016
From: aycabta <ko1@a...>
Date: Wed, 12 Feb 2020 19:45:41 +0900 (JST)
Subject: [ruby-changes:60016] 15cacf1f55 (master): Add test_complete_symbol
https://git.ruby-lang.org/ruby.git/commit/?id=15cacf1f55 From 15cacf1f5588e34f1745790f7405bde845b2ac08 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Wed, 12 Feb 2020 19:40:10 +0900 Subject: 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. diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index b23f73e..f302499 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -26,6 +26,12 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_completion.rb#L26 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/