diff options
author | Stan Lo <stan001212@gmail.com> | 2023-02-24 21:34:35 +0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-02-24 13:34:40 +0000 |
commit | 07403de5a8a2d5239a15520513efcb3a5041580f (patch) | |
tree | 57d7c75f08f38f634edbc11195be7a0095af2725 /test | |
parent | 5d5ff6e5eda887b39691db4db58ac1c2c3a1f8d9 (diff) | |
download | ruby-07403de5a8a2d5239a15520513efcb3a5041580f.tar.gz |
[ruby/irb] Cleanup completion tests
(https://github.com/ruby/irb/pull/520)
* Remove redundant completion test
The test case was introduced to guard an old implementation, which relied
on `Module#name`. Commit:
https://github.com/ruby/irb/commit/8827d182746396dbf4499c2c1c8c0e9bf8375b7c
However, the current implementation has avoided calling `Module#name`
completely, so the test case is no longer necessary. Commit:
https://github.com/ruby/irb/commit/88311ce3c84251e6f420246cd14efc96e00888be
* Remove unnecessary pend
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_completion.rb | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 1ab7dbbb19..b93b5e804a 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -11,23 +11,6 @@ module TestIRB IRB::InputCompletor.class_variable_set(:@@files_from_load_path, nil) end - def test_nonstring_module_name - begin - require "irb/completion" - bug5938 = '[ruby-core:42244]' - bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : [] - cmds = bundle_exec + %W[-W0 -rirb -rirb/completion -e IRB.setup(__FILE__) - -e IRB.conf[:MAIN_CONTEXT]=IRB::Irb.new.context - -e module\sFoo;def\sself.name;//;end;end - -e IRB::InputCompletor::CompletionProc.call("[1].first.") - -- -f --] - status = assert_in_out_err(cmds, "", //, [], bug5938) - assert(status.success?, bug5938) - rescue LoadError - pend "cannot load irb/completion" - end - end - class TestMethodCompletion < TestCompletion def test_complete_string assert_include(IRB::InputCompletor.retrieve_completion_data("'foo'.up", bind: binding), "'foo'.upcase") @@ -131,7 +114,6 @@ module TestIRB end def test_complete_require_library_name_first - pend 'Need to use virtual library paths' candidates = IRB::InputCompletor::CompletionProc.("'csv", "require ", "") assert_equal "'csv", candidates.first end |