aboutsummaryrefslogtreecommitdiffstats
path: root/test/reline/test_reline.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/reline] Reduce direct references to `Reline::IOGate`Stan Lo2023-07-071-5/+5
| | | | | | | | | | | | | | | | | (https://github.com/ruby/reline/pull/566) * Avoid referencing IOGate from IOGate classes The only time those classes being used is when themselves being the IOGate. So when referencing to IOGate, it's better to use `self` instead. * Avoid referencing to IOGate from LineEditor directly * Avoid referencing to IOGate from Core directly * Reference to Reline.core directly * Replace Reline::IOGate with Reline.core.io_gate
* [ruby/reline] Update Relin::IOGate dinamically when it is neededtomoya ishida2023-07-051-0/+1
| | | | | | (https://github.com/ruby/reline/pull/560) https://github.com/ruby/reline/commit/4680d1c9e0
* [ruby/reline] Change Reline.add_dialog_proc(name, nil) to properlytomoya ishida2023-04-151-0/+3
| | | | | | | remove dialog_proc (https://github.com/ruby/reline/pull/532) https://github.com/ruby/reline/commit/43283b2f37
* [ruby/reline] test_dumb_terminal: "ruby" command is not always availableSorah Fukumori2023-02-051-1/+1
| | | | | | | | | | | | | | | | Fixes the same issue at https://github.com/ruby/ruby/pull/5417 `ruby` is not always available in certain build environments and configure options (e.g. --program-suffix) This patch tries to choose an appropriate command line for spawning a fresh Ruby process, based on EnvUtil implementation in ruby/ruby's test suite. Plus when this library is directly mirrored into ruby/ruby, prefer EnvUtil available there over the implementation in this library's test suite. https://github.com/ruby/reline/commit/278327d2e9
* [ruby/reline] Remove unapproved color setting APIsStan Lo2022-12-051-29/+0
| | | | | | | | | | | | | These APIs/configs are not approved by the Ruby core, so they can't be released to the public. This means having them in the codebase will block other fixes/features from being released as well. So this commit removes those exposed interfaces to unblock the release. Hopefully when https://bugs.ruby-lang.org/issues/18996 is approved we can re-implement better APIs. https://github.com/ruby/reline/commit/f7a961c550
* [ruby/reline] Support dumb terminalNobuyoshi Nakada2022-09-011-0/+6
| | | | | | | | The "dumb" terminal is considered only on MSys tty now. However, the `TERM` feature has been used on many Unix-like systems for decades, not MSys specific. https://github.com/ruby/reline/commit/53fd51ab62
* [ruby/reline] Rename dialog_pointer_* to dialog_highlight_*st00122022-07-221-9/+9
| | | | | | | | "Pointer" is not what we usually use to describe a selected item. "Highlight" is a more common word for the scenario so we should use it instead. https://github.com/ruby/reline/commit/b4279d1557
* [ruby/reline] Use color name instead of code (integer) in dialog color APIsst00122022-07-161-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | As pointed out in the [comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973), the code is actually a control sequence and not only for colors. To make the dialog color APIs safer to use, we should restrict its usages and extract away the bg/fg concept from the input. So in this commit, I made these changes: 1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol): - :black - :red - :green - :yellow - :blue - :magenta - :cyan - :white 2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code. https://github.com/ruby/reline/commit/b32a977766
* [ruby/reline] Add tests for top-level dialog color APIsst00122022-07-111-0/+17
| | | | https://github.com/ruby/reline/commit/347a468c59
* [ruby/reline] Remove test TODO comments that have been confirmed by E2E testsaycabta2022-01-031-12/+0
| | | | https://github.com/ruby/reline/commit/2ed77b693f
* [ruby/reline] Use omit instead of skipHiroshi SHIBATA2021-12-291-1/+1
| | | | https://github.com/ruby/reline/commit/a538de421f
* [ruby/reline] Add a test for dialog proc with contextaycabta2021-12-201-0/+14
| | | | https://github.com/ruby/reline/commit/2ce2696d6e
* [ruby/reline] Add an assertion for overwriting dialog proc with the same nameaycabta2021-12-201-0/+5
| | | | https://github.com/ruby/reline/commit/96067bc13c
* [ruby/reline] Rename the variable "p" because it overlaps with the "p" methodaycabta2021-12-201-21/+21
| | | | https://github.com/ruby/reline/commit/9bf2ca692e
* [ruby/reline] Add support for overwriting dialog proc with the same nameaycabta2021-12-201-3/+6
| | | | https://github.com/ruby/reline/commit/16aa20c380
* [ruby/reline] Add Reline.dialog_proc(name_sym)aycabta2021-12-201-0/+5
| | | | https://github.com/ruby/reline/commit/7e5dbe4750
* [ruby/reline] Add a test for Reline.add_dialog_procaycabta2021-12-201-0/+15
| | | | https://github.com/ruby/reline/commit/c4bb1bfd79
* [ruby/reline] Skip when unable to set inputNobuyoshi Nakada2021-10-131-1/+6
| | | | | | | `Reline::Windows` always reads from the console by Windows API using fiddle. https://github.com/ruby/reline/commit/c3bf85f5af
* [ruby/reline] Close working pipesNobuyoshi Nakada2021-10-121-2/+7
| | | | https://github.com/ruby/reline/commit/ac519f57ea
* [ruby/reline] Reline doesn't have Reline.editing_modeaycabta2021-10-111-4/+0
| | | | https://github.com/ruby/reline/commit/90c61d8188
* [ruby/reline] Add I/O testaycabta2021-10-111-6/+10
| | | | https://github.com/ruby/reline/commit/bca9b9012f
* [ruby/reline] Use single quotes to match the othersaycabta2021-10-111-1/+1
| | | | https://github.com/ruby/reline/commit/58a7ca4101
* [ruby/reline] Add a test for Reline.delete_textaycabta2021-10-111-0/+19
| | | | https://github.com/ruby/reline/commit/d1c5700fa3
* [ruby/reline] Add assertions for Reline.pointaycabta2021-10-111-4/+2
| | | | https://github.com/ruby/reline/commit/a8c7b207f0
* [ruby/reline] Add a test for Reline.insert_text and Reline.line_bufferaycabta2021-10-111-5/+3
| | | | https://github.com/ruby/reline/commit/ae828208e1
* Stop using global constant, RELINE_TEST_ENCODINGaycabta2021-06-211-1/+1
|
* [ruby/reline] The config file must accept any character encodingaycabta2021-06-211-1/+7
| | | | | | | | | | In Japan, so many programmers used EUC-JP to write text files that contain Japanese. Many .inputrc files which contain EUC-JP are still being copied and used. This commit supports the whole encoding of what user set including UTF-8. ref. https://github.com/ruby/reline/pull/280 https://github.com/ruby/reline/commit/0b45022e16
* [ruby/reline] Suppress crashing when completer_{quote,word_break}_characters ↵aycabta2021-03-241-0/+4
| | | | | | is empty https://github.com/ruby/reline/commit/c6f1164942
* Restore class variable setting for testsaycabta2020-05-141-0/+32
|
* Initialize Reline callbacks when test suit startsaycabta2020-05-141-0/+6
|
* skip test if Reline.completion_proc is nil.Koichi Sasada2020-03-021-1/+4
| | | | | Some other tests can set Reline.completion_proc, so if it is nil, simply skip this test.
* Reline: Fix changed test results due to change to UTF-8 on WindowsLars Kanis2020-01-211-9/+13
| | | | | | | | | | 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.
* Change argument `Proc` to `#call` defined object.manga_osyo2019-11-211-0/+24
| | | | This is the same as the behavior of Readline.
* Prefer dedecated assertionsNobuyoshi Nakada2019-11-191-4/+4
|
* Fixed `assert_equal` first argument to be expected.manga_osyo2019-11-121-4/+4
|
* Reline#readline and Reline#readmultiline to private.osyo-manga2019-11-121-2/+6
|
* Swap expected and actual correctlyaycabta2019-10-071-50/+50
|
* Add test with encoding.manga_osyo2019-08-271-10/+10
|
* Change to test file path.manga_osyo2019-08-271-0/+242