summaryrefslogtreecommitdiff
path: root/test/reline
AgeCommit message (Collapse)Author
2020-03-27[ruby/reline] Suppress $/ warningsNobuyoshi Nakada
https://github.com/ruby/reline/commit/f4eac8c76f
2020-03-26[ruby/reline] Add a comment why rescue yamatanooroti loading error on the testaycabta
https://github.com/ruby/reline/commit/2a8061daec
2020-03-26[ruby/reline] Rename test suite name of yamatanooroti testaycabta
https://github.com/ruby/reline/commit/b0f32f5de4
2020-03-26[ruby/reline] Add yamatanooroti rendering testaycabta
https://github.com/ruby/reline/commit/f092519525
2020-03-26[ruby/reline] Suppress error in case INPUTRC env is emptyaycabta
https://github.com/ruby/reline/commit/bce7e7562b
2020-03-26[ruby/reline] Work with wrong $/ value correctlyaycabta
https://github.com/ruby/reline/commit/962ebf5a1b
2020-03-02Reset Reline.pointKoichi Sasada
TestRelineAsReadline#test_insert_text expects Readline.point == 0 at the beginning of the test, but a test violate this assumption.
2020-03-02skip test if Reline.completion_proc is nil.Koichi Sasada
Some other tests can set Reline.completion_proc, so if it is nil, simply skip this test.
2020-01-26Use test_mode on Reline::History::Test for encodingaycabta
2020-01-21Reline: Fix changed test results due to change to UTF-8 on WindowsLars Kanis
In commit f8ea2860b0cac1aec79978e6c44168802958e8af the Reline encoding for native windows console was changed to hardcoded UTF-8. This caused failures in reline and readline tests, but they were hidden, because parallel ruby tests incorrectly used Reline::ANSI as IOGate. Tests failures were raised in single process mode, but not with -j switch. This patch corrects encodings on native Windows console. Notes: Merged: https://github.com/ruby/ruby/pull/2848
2020-01-21[ruby/reline] Implement vi_change_metaaycabta
https://github.com/ruby/reline/commit/8538e0e10f
2020-01-20[ruby/reline] Implement vi_prev_char and vi_to_prev_charaycabta
https://github.com/ruby/reline/commit/0ad3ee63fa
2020-01-20[ruby/reline] Implement vi_to_next_charaycabta
https://github.com/ruby/reline/commit/066ecb0a21
2020-01-17Implement vi_insert_at_bol and vi_add_at_eolaycabta
2020-01-17Add tests for vi_insert and vi_addaycabta
2020-01-14Introduce an abstracted structure about the encoding of Relineaycabta
The command prompt on Windows always uses Unicode to take input and print output but most Reline implementation depends on Encoding.default_external. This commit introduces an abstracted structure about the encoding of Reline.
2020-01-06Support history-size in .inputrc correctlyaycabta
2020-01-06Complete indented and quoted string correctlyaycabta
def foo ''.upca[TAB] This will be completed to be: def foo ''.upcase The indent was gone. This commit fixes the bug.
2019-12-27Add test_completion_with_indent_and_completer_quote_charactersaycabta
This is for 8a705245e55575d4d310a2e956b89a36a5931971.
2019-12-25^D on non-empty line in vi mode behaves like Enteraycabta
2019-12-24The delete-char-or-list shows completed list when called at end of lineaycabta
It doesn't behave the same as the delete-char.
2019-12-17Support change search directionaycabta
2019-12-17Support forward-search-history by C-saycabta
2019-12-13Show a menu before a documentaycabta
IRB should show a menu first if a completed list has plural items. But just shows document without menu if a completed list with plural items includes a perfect matched item. The behavior is a bug. This commit fixes it.
2019-12-12Suppress to crash IRB if completed list has nilaycabta
2019-12-10Support completion with case-insensitive fashionaycabta
Reline performs completion in a case-insensitive fashon if Readline.completion_case_fold or completion-ignore-case of .inputrc are set "on".
2019-12-05Change encoding of completion list...for more testsaycabta
2019-12-05Change encoding of completion listaycabta
2019-12-05Support disable-completionaycabta
2019-12-05Fix variable catchaycabta
2019-12-03Support incremental search by last determined wordaycabta
In the incremental search by C-r, search word is saved when it's determined. In the next incremental search by C-r, if a user presses C-r again with the empty search word, the determined previous search word is used to search.
2019-12-02Support incremental search again by C-r in incremental searchaycabta
2019-12-02Search history to back in the middle of historiesaycabta
2019-12-02Remove obsolete codeaycabta
2019-12-01The ed_search_prev_history should always search to backwardaycabta
2019-11-21Add test/reline/test_string_processing.rbaycabta
2019-11-21Change argument `Proc` to `#call` defined object.manga_osyo
This is the same as the behavior of Readline.
2019-11-19Prefer dedecated assertionsNobuyoshi Nakada
2019-11-15Implement em_set_mark and em_exchange_markaycabta
2019-11-12Fixed `assert_equal` first argument to be expected.manga_osyo
2019-11-12Reline#readline and Reline#readmultiline to private.osyo-manga
2019-10-07Swap expected and actual correctlyaycabta
2019-09-25Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans
Cfuncs that use rb_scan_args with the : entry suffer similar keyword argument separation issues that Ruby methods suffer if the cfuncs accept optional or variable arguments. This makes the following changes to : handling. * Treats as **kw, prompting keyword argument separation warnings if called with a positional hash. * Do not look for an option hash if empty keywords are provided. For backwards compatibility, treat an empty keyword splat as a empty mandatory positional hash argument, but emit a a warning, as this behavior will be removed in Ruby 3. The argument number check needs to be moved lower so it can correctly handle an empty positional argument being added. * If the last argument is nil and it is necessary to treat it as an option hash in order to make sure all arguments are processed, continue to treat the last argument as the option hash. Emit a warning in this case, as this behavior will be removed in Ruby 3. * If splitting the keyword hash into two hashes, issue a warning, as we will not be splitting hashes in Ruby 3. * If the keyword argument is required to fill a mandatory positional argument, continue to do so, but emit a warning as this behavior will be going away in Ruby 3. * If keyword arguments are provided and the last argument is not a hash, that indicates something wrong. This can happen if a cfunc is calling rb_scan_args multiple times, and providing arguments that were not passed to it from Ruby. Callers need to switch to the new rb_scan_args_kw function, which allows passing of whether keywords were provided. This commit fixes all warnings caused by the changes above. It switches some function calls to *_kw versions with appropriate kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS is used. If creating new arguments, RB_PASS_KEYWORDS is used if the last argument is a hash to be treated as keywords. In open_key_args in io.c, use rb_scan_args_kw. In this case, the arguments provided come from another C function, not Ruby. The last argument may or may not be a hash, so we can't set keyword argument mode. However, if it is a hash, we don't want to warn when treating it as keywords. In Ruby files, make sure to appropriately use keyword splats or literal keywords when calling Cfuncs that now issue keyword argument separation warnings through rb_scan_args. Also, make sure not to pass nil in place of an option hash. Work around Kernel#warn warnings due to problems in the Rubygems override of the method. There is an open pull request to fix these issues in Rubygems, but part of the Rubygems tests for their override fail on ruby-head due to rb_scan_args not recognizing empty keyword splats, which this commit fixes. Implementation wise, adding rb_scan_args_kw is kind of a pain, because rb_scan_args takes a variable number of arguments. In order to not duplicate all the code, the function internals need to be split into two functions taking a va_list, and to avoid passing in a ton of arguments, a single struct argument is used to handle the variables previously local to the function. Notes: Merged-By: jeremyevans <code@jeremyevans.net>
2019-08-27Add test with encoding.manga_osyo
2019-08-27Change to test file path.manga_osyo
2019-08-27Refactoring Reline.manga_osyo
2019-08-27Fix reference core method.manga_osyo
2019-08-27Remove test_mode in `lib/reline`.manga_osyo
2019-08-18Remove commented out debug printaycabta
2019-08-18Don't crash when deleting at the end of the lineAlan Wu
To reproduce this bug, type one character into irb, then press the delete key on your keyboard.