summaryrefslogtreecommitdiff
path: root/test/irb/test_completion.rb
AgeCommit message (Collapse)Author
2022-11-03[ruby/irb] Provide a base test class and let tests restore encodingsStan Lo
conveniently (https://github.com/ruby/irb/pull/429) * Create a base TestIRB::TestCase class * Save/restore encodings for tests that initializes InputMethod classes Because `RelineInputMethod#initializes` calls `set_encoding`, which changes stdio/out/err and Encoding's default encoding values, we need to make sure any test that directly or indirectly (e.g. through Context) initializes `RelineInputMethod` restores encodings. `ReadlineInputMethod` also changes encodings but currently no tests cover it. * Remove unnecessary TestHelper module Since we now have a base TestCase, without_rdoc can just live there. https://github.com/ruby/irb/commit/c2874ec121
2022-10-27[ruby/irb] Add missing require Stan Lo
2022-10-27[ruby/irb] Add test for IRB::InputCompletor::PerfectMatchedProcst0012
This proc displays rdoc document when the input matches certain symbols perfectly, like "String". It's commonly triggered with autocompletion but only has 1 test case. So this commit increases its test coverage. https://github.com/ruby/irb/commit/d85d719313
2022-10-08[ruby/irb] Sort constant completion's candidatesst0012
https://github.com/ruby/irb/commit/ee9b33c817
2022-10-08[ruby/irb] Correct assert_equal's usage in completion testsst0012
https://test-unit.github.io/test-unit/en/Test/Unit/Assertions.html#assert_equal-instance_method https://github.com/ruby/irb/commit/00f90d40ad
2022-10-08[ruby/irb] Add constant completion testst0012
https://github.com/ruby/irb/commit/39f8fcb058
2022-10-08[ruby/irb] Regroup completion testsst0012
https://github.com/ruby/irb/commit/71631287c8
2022-10-08[ruby/irb] Add tests for primitive types' method completionst0012
https://github.com/ruby/irb/commit/2e12fac38e
2022-10-05[ruby/irb] Fixed sort of variables in completionImir Kiyamov
https://github.com/ruby/irb/commit/5842888255
2022-10-03[ruby/irb] Change to explicit method call in completion ↵osyo-manga
(https://github.com/ruby/irb/pull/369) Ensure that methods are called even when local variables are defined. see: https://github.com/ruby/irb/issues/368 https://github.com/ruby/irb/commit/c34d54b8bb
2022-09-21[ruby/irb] Fix completion testsStan Lo
https://github.com/ruby/irb/commit/eb1691f636
2022-09-21[ruby/irb] Handle non-String $LOAD_PATH values more carefullyst0012
In addition to String values, $LOAD_PATH can also take objects that respond_to the `to_path` method, like Pathname objects. So `irb` should be able to handle those objects too. And if $LOAD_PATH contains objects that can't be converted into String, `irb` should simply ignore it. https://github.com/ruby/irb/commit/b2f562176b
2021-10-13[ruby/irb] Ignore parenthesis during completionKaíque Kandy Koga
Rename method https://github.com/ruby/irb/commit/619aecb412
2021-09-24Pend test_complete_require_library_name_firstaycabta
2021-09-23[ruby/irb] Ignore any encoding errors while symbol completionNobuyoshi Nakada
https://github.com/ruby/irb/commit/daa65cded1
2021-09-21[ruby/irb] Fix argument orderNobuyoshi Nakada
https://github.com/ruby/irb/commit/05c65858a0
2021-09-11[ruby/irb] Ignore invalid 3 colons in completionaycabta
https://github.com/ruby/irb/commit/5e29e3e39c
2021-09-08[ruby/irb] Use "csv" for testaycabta
The "csv" doesn't conflict with other stdlib names in any Ruby processing system. https://github.com/ruby/irb/commit/49203a1c83
2021-09-08[ruby/irb] Show lib name first because it's the most common use caseaycabta
https://github.com/ruby/irb/commit/74d635758b
2021-09-04[ruby/irb] Suppress "assigned but unused variable" warningaycabta
https://github.com/ruby/irb/commit/a1ddf64c69
2021-09-04[ruby/irb] Add an assertion to check completion "var.method" to get correct ↵aycabta
"class.method" https://github.com/ruby/irb/commit/cc1ddb37a9
2021-09-04[ruby/irb] Retrieve completed receiver that is a module or class correctlyaycabta
https://github.com/ruby/irb/commit/b2324727e1
2021-09-02[ruby/irb] Detect the variable class to show docaycabta
https://github.com/ruby/irb/commit/33b9bec954
2021-08-30[ruby/irb] Use pend instead of skipHiroshi SHIBATA
https://github.com/ruby/irb/commit/f441ce35bf
2021-03-25[ruby/irb] Cache completion files to requireaycabta
https://github.com/ruby/irb/commit/612ebcb311
2021-03-24[ruby/irb] fix completion test when out-of-place buildNobuyoshi Nakada
2021-03-24[ruby/irb] Complete require and require_relativeaycabta
https://github.com/ruby/irb/commit/1c61178b4c
2021-01-08should use `assert_include` here.Koichi Sasada
Random ordering test can introduce antoher candidate so it should be `assert_include`.
2021-01-08[ruby/irb] do not escape a predicate method for doc namespaceNobuhiro IMAI
* Fixes #88 https://github.com/ruby/irb/commit/d431a30af4
2020-02-15[ruby/irb] fix reserved words and completion for themNobuhiro IMAI
https://github.com/ruby/irb/commit/6184b227ad
2020-02-14test/irb/test_completion.rb: suppress a warning: unused literal ignoredYusuke Endoh
2020-02-12Add test_complete_symbolaycabta
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.
2020-02-12Revert "[ruby/irb] Add test_complete_symbol"Hiroshi SHIBATA
This reverts commit 3af3431c2c145134996e66f3d8d9ade8ad81bde0.
2020-02-12[ruby/irb] Check doc namespace correctlyaycabta
IRB::InputCompletor::PerfectMatchedProc crashes when doc not found because a variable name was incorrect. https://github.com/ruby/irb/commit/889fd4928f
2020-02-12[ruby/irb] Add test_complete_symbolaycabta
https://github.com/ruby/irb/commit/dbbf086c1f
2019-11-28Add require "irb" to test/irb/test_completion.rbaycabta
2019-11-28Fix regexp to complete complex literalaycabta
IRB completion logic always needed exponential notation for complex literal such as 3e6i but it's bug. I fixed to support complex literal without exponential notation such as 3i.
2019-06-13make sync-default-gems GEM=irbTakashi Kokubun
Upgrade IRB to https://github.com/ruby/irb/commit/41ea43a4a732e094acfa1b0fc1473fdcda9e6227 Mostly backport changes.
2019-04-27make sync-default-gems GEM=irbTakashi Kokubun
Synced from https://github.com/ruby/irb/commit/5feb361ed80736efa5b2c2b629837ec2a5fc2cdb. This includes a support to colorize named Class instance on IRB inspect.
2019-04-26make sync-default-gems GEM=irbTakashi Kokubun
from https://github.com/ruby/irb/commit/e6739d8c66dc78562930adb0b96935c9b38acf74
2019-04-20Remove IRB's old test filesaycabta
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-30* test/irb/test_completion.rb: skip if cannot load irb/completionusa
(maybe readline does not exist). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-27* lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):nobu
ignore non-string name modules. [ruby-core:42244][Bug #5938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e