summaryrefslogtreecommitdiff
path: root/test/reline/yamatanooroti
AgeCommit message (Collapse)Author
2025-01-24Migrate irb and reline to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12624
2025-01-06[ruby/reline] Enter newline if cursor position is middle of inputMari Imaizumi
(https://github.com/ruby/reline/pull/802) * Enter newline if cursor position is middle of input * Add ed_force_submit to allow input confirmation on non-final lines https://github.com/ruby/reline/commit/8ef534e904
2025-01-05[ruby/reline] Refactor utf-8 strings and invalid strings in testtomoya ishida
code (https://github.com/ruby/reline/pull/800) * Remove invalid encoding string "\M-[char]" from test code, remove unused code/arg/options * Omit unicode unnoralized input test in non-utf8 testcase * Remove helper method and constant no longer used in testcode * Change key binding test to use realistic bytes instead of invalid byte sequence * Remove invalid byte sequence input from rendering test yamatanooroti handles invalid byte sequence input "\M-[char]" and converts it to "\e[char]" We don't need to use these invalid byte sequence and rely on the hack implemented in yamatanooroti https://github.com/ruby/reline/commit/f09e7b154c
2025-01-05[ruby/reline] Fix bracketed paste and scrolling bugtomoya ishida
(https://github.com/ruby/reline/pull/801) * Fix set_pasting_state bug with bracketed paste * Fix rendered cursor_y caching in case of rendering the screen without scroll_into_view https://github.com/ruby/reline/commit/c5d5c444df
2025-01-01[ruby/reline] Support inserting C-c C-z C-\ with quoted_inserttomoya ishida
(https://github.com/ruby/reline/pull/798) https://github.com/ruby/reline/commit/e6eb5d2d3c
2024-12-06[ruby/reline] Combine MAPPINGS(single byte input to symbol) withtomoya ishida
key_bindings(escape sequence to symbol) (https://github.com/ruby/reline/pull/715) https://github.com/ruby/reline/commit/6a7e249374
2024-11-30[ruby/reline] Call user defined sigwinch and sigcont handlertomoya ishida
(https://github.com/ruby/reline/pull/788) https://github.com/ruby/reline/commit/7d44770c84
2024-11-08[ruby/reline] Windows fix (https://github.com/ruby/reline/pull/775)YO4
* test_yamatanooroti: close tempfile before unlink * test_yamatanooroti: omit because of windows does not support job control * test_yamatanooroti: change startup message detection for windows * windows.rb: can call win32api using nil as NULL for pointer argument Exception occurred when interrupted with Ctrl+C on legacy conhost * windows.rb: fix get_screen_size return [window height, buffer width] insted of [buffer height, buffer width] * windows.rb: import scroll_down() from ansi.rb * windows.rb: add auto linewrap control if VT output not supported (legacy console) * unfreeze WIN32API pointer arguments They internally duplicate arguments so api functions write to another place. This breaks the console mode detection with ruby-head. * remove useless code from Win32API#call argument repacking and return value tweaking is not needed for Reline::Windows requirements. * Correctly handle top of console viewport * Revert "remove useless code from Win32API#call" This reverts commit https://github.com/ruby/reline/commit/060ba140ed43. * Revert "windows.rb: can call win32api using nil as NULL for pointer argument" This reverts commit https://github.com/ruby/reline/commit/93a23bc5d0c9. https://github.com/ruby/reline/commit/47c1ffbabe
2024-10-05[ruby/reline] Fix tempfile leaksNobuyoshi Nakada
(https://github.com/ruby/reline/pull/757) https://github.com/ruby/reline/actions/runs/11187507536/job/31104699331#step:13:1064 ``` Children under /tmp/rubytest.m48l5o: * -rw------- 1 101 2024-10-02 17:43:51 +0000 rubyfile20241002-60503-bhbfgq ``` https://github.com/ruby/reline/commit/1287f97a6f
2024-10-05[ruby/reline] Hash#inspect style has changed in ruby 3.4Nobuyoshi Nakada
[[Bug #20433]](https://bugs.ruby-lang.org/issues/20433) https://github.com/ruby/reline/commit/ca457ffb70
2024-10-04[ruby/reline] Concatenate some rendeing testtomoya ishida
(https://github.com/ruby/reline/pull/749) https://github.com/ruby/reline/commit/41b54140f4
2024-10-03[ruby/reline] Make rendering test faster using updated yamatanoorotitomoya ishida
(https://github.com/ruby/reline/pull/747) https://github.com/ruby/reline/commit/7534f7f92a
2024-09-03[ruby/reline] Fix redisplay/insert_text called from pre_input_hooktomoya ishida
(https://github.com/ruby/reline/pull/742) * Fix redisplay/insert_text called from pre_input_hook * Rename insert_pasted_text to insert_multiline_text It is now used from Reline.insert_text which is not inserting pasted text https://github.com/ruby/reline/commit/694a540939
2024-07-12[ruby/reline] Fix rendering bug of nomultiline prompttomoya ishida
(https://github.com/ruby/reline/pull/730) Fix bug of `print('a'*10); Reline.readline('>')` wrong rendering https://github.com/ruby/reline/commit/c0469a12b9
2024-06-25[ruby/reline] Rerender and enter raw mode again by SIGCONTtomoya ishida
(https://github.com/ruby/reline/pull/727) https://github.com/ruby/reline/commit/be45660c83
2024-06-04Revert "Revert "[ruby/reline] Reline::ANSI is general io. Reline::GeneralIO ↵Takashi Kokubun
is not."" This reverts commit 6e84ac2359c8fc8cb686ef4644b9cae26cd5ab9e. Now that the rubygems spec change has been merged, let's try reverting this and fixing it with tompng's new patch.
2024-06-03Revert "[ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not."Takashi Kokubun
This reverts commit ba01d15cf5db96933905d669c68f5cc0cd6910b8. It seems to be failing test-bundler-parallel. Reverting it to normalize the CI. We should revert this revert once we figure it out.
2024-06-03[ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not.tomoya ishida
(https://github.com/ruby/reline/pull/659) Reline::ANSI has a partial non-tty supporting code. It should be a general io. Reline::Dumb should be only used in testing. https://github.com/ruby/reline/commit/2d6828473d
2024-05-27[ruby/reline] Implement the redo commandverdy89
(https://github.com/ruby/reline/pull/707) * Implement the redo command * Commented out a test that does not pass * Changed key assignment for redo from "\C-[" to "\C-g" * Changed redo key assignment from `\C-g` to `\M-\C-_` * Revert the first implemantation * Implemented redo by sharing `@past_lines` between undo and redo * Fixed the index of past_lines that is updated when the cursor is moved * Fixed deletion of the redo history in regular input * Renamed variables: past_lines -> input_lines * Rename @position to @input_lines_position * Deleted unused variables: `@old_byte_pointer` and `@old_line_index` https://github.com/ruby/reline/commit/0b2d9fab5f
2024-05-14[ruby/reline] Implement the undo commandMari Imaizumi
(https://github.com/ruby/reline/pull/701) * Refactor send * Implement the undo command * Fix @past_lines initialization * Improve assertion * Hide to save buffer in insert_pasted_text * Replace @using_delete_command with @undoing * Refactor `@past_lines` https://github.com/ruby/reline/commit/4ab72f9cbd
2024-05-08[ruby/reline] Implement bracketed paste inserttomoya ishida
(https://github.com/ruby/reline/pull/655) https://github.com/ruby/reline/commit/e92dcbf514
2024-05-02[ruby/reline] Fix prompt width calculation bug. Test with coloredtomoya ishida
prompt (https://github.com/ruby/reline/pull/695) https://github.com/ruby/reline/commit/24aab01cbc
2024-04-30[ruby/reline] Fix completion dialog position when completed part istomoya ishida
wordwrapped (https://github.com/ruby/reline/pull/692) https://github.com/ruby/reline/commit/2d9acd16fe
2024-04-29[ruby/reline] Input with eof and no newline bugfixtomoya ishida
(https://github.com/ruby/reline/pull/671) https://github.com/ruby/reline/commit/0d66c335a1
2024-04-19[ruby/reline] Implement `show-all-if-ambiguous` featureMari Imaizumi
(https://github.com/ruby/reline/pull/683) https://github.com/ruby/reline/commit/0fe4fdc794
2024-04-17[ruby/reline] Refactor nomultiline and multiline mode differencetomoya ishida
(https://github.com/ruby/reline/pull/653) * Support multiline input in Reline.readline internally, reduce multiline-singleline branch * Add readline(singleline) prompt test with force inserting multiline text https://github.com/ruby/reline/commit/97846095d7
2024-04-05[ruby/reline] Thread safe readlinetomoya ishida
(https://github.com/ruby/reline/pull/669) Block until other Reline.readline or Reline.readmultiline finish https://github.com/ruby/reline/commit/ebab2875f1
2024-04-04[ruby/reline] Fix audoindent including "\v", escape "\v" fortomoya ishida
rendering (https://github.com/ruby/reline/pull/648) https://github.com/ruby/reline/commit/9c51c577ca
2024-04-01[ruby/reline] Refactor completiontomoya ishida
(https://github.com/ruby/reline/pull/647) * Refactor completion: split autocompletion and tabcompletion logic and state * Move completion candidate listup logic from dialog proc to LineEditor https://github.com/ruby/reline/commit/c3c09ac9c2
2024-03-24[ruby/reline] Add mode_string to prompt calculation dependenciestomoya ishida
(https://github.com/ruby/reline/pull/658) * Add mode_string to prompt calculation dependencies * Update vi show-mode-in-prompt test https://github.com/ruby/reline/commit/a0cee06ec5
2024-03-23[ruby/reline] Make mutated string in yamatanooroti explicitlyStan Lo
mutable (https://github.com/ruby/reline/pull/662) This avoids the frozen literal warning in Ruby 3.4. https://github.com/ruby/reline/commit/cccb985804
2024-03-19[ruby/reline] Reline 0.5.0.pretomoya ishida
(https://github.com/ruby/reline/pull/614) * Re-architecture LineEditor's internal state and rendering * Fix test related to LineEditor re-architecture * Bump to 0.5.0.pre.1 * Hide cursor only when updating screen. Frequent hide&show makes cursor flickering. * Simplify rerender call from reline.rb * Simplify handle_cleared It only need to clear screen. line_editor.rerender will be called later. * Add description of updating pasting_state inserts continuous_insertion_buffer * Use meaningful block parameter Co-authored-by: Stan Lo <stan001212@gmail.com> * Fix use of `@cursor_y` Fix bug updating `@cursor_y`. Do not use `@cursor_y` while updating dialog because it is not current cursor position but cursor position at last rendered time. * Remove useless instance_variable_set in test These instance variables are already removed from LineEditor * Always initialize instance variables to avoid ruby 2.7 warning, remove unused instance variable * Call update_dialogs from reline.rb before first render * Combine state representing rendered screen information into `@rendered_screen` * Rename editor_cursor_ to wrapped_cursor It represents cursor position of word wrapped whole content * Remove unused code, tweak, add comment --------- https://github.com/ruby/reline/commit/3fa376217d Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-01-04[ruby/reline] Fix pasting tab-indented code crashtomoya ishida
(https://github.com/ruby/reline/pull/630) https://github.com/ruby/reline/commit/90155fd0d9
2023-11-06[ruby/reline] Introduce a new class Reline::Face to configureHASUMI Hitoshi
character attributes (https://github.com/ruby/reline/pull/552) * Reine::Face * fix test_yamatanooroti * Define singleton methods to make accessors to attributes of a face * s/display/foreground/ * s/default/default_style/ && s/normal_line/default/ && s/enhanced_line/enhanced/ * fix typo * FaceConfig.new now takes keyword arguments * Update lib/reline/face.rb Co-authored-by: Stan Lo <stan001212@gmail.com> * Update test/reline/test_face.rb Co-authored-by: Stan Lo <stan001212@gmail.com> * Fix to correspond to frozen_string_literal * Face::FaceConfig -> Face::Config * ref https://github.com/ruby/reline/pull/552#pullrequestreview-1677282576 * delete unused ivar * ref https://github.com/ruby/reline/pull/552#discussion_r1358783723 * insert "\e[0m" into all SGR * tiny fix * ESSENTIAL_DEFINE_NAMES ref https://github.com/ruby/reline/pull/552#discussion_r1367722247 * Change to Hash-accessor style - Reline::Face[:completion_dialog].enhanced -> Reline::Face[:completion_dialog][:enhanced] - Reline::Face.configs shows all defined values * Cache array method call in local variable * Tests for Face configuration variations * resolve https://github.com/ruby/reline/pull/552#pullrequestreview-1710938154 * amend to * check invalid SGR parameter in :style * The order of define values should be preserved * Update test/reline/test_face.rb Co-authored-by: Stan Lo <stan001212@gmail.com> * Update test/reline/test_face.rb Co-authored-by: Stan Lo <stan001212@gmail.com> * Add methods: load_initial_config and reset_to_initial_config. And teardown in tests * omission in amending "style: :default" to "style: :reset" * refs https://github.com/ruby/reline/issues/598 * Fix link * amend method name * Update lib/reline/face.rb Co-authored-by: ima1zumi <52617472+ima1zumi@users.noreply.github.com> --------- https://github.com/ruby/reline/commit/fdc1d3b1e5 Co-authored-by: Stan Lo <stan001212@gmail.com> Co-authored-by: ima1zumi <52617472+ima1zumi@users.noreply.github.com>
2023-08-20[ruby/reline] Remove Timeout usageStan Lo
(https://github.com/ruby/reline/pull/580) Timeout's implementation relies on Thread, which would conflict with `ruby/debug`'s thread-freezing implementation and has casued issues like - ruby/debug#877 - ruby/debug#934 - ruby/debug#1000 This commit avoids the issue by completely removing the use of Timeout. https://github.com/ruby/reline/commit/d4f0cd3fe1
2023-07-19[ruby/reline] Add assertion to auto_indent_proc's parameter, addtomoya ishida
Ctrl-d exit test (https://github.com/ruby/reline/pull/574) * Add auto_indent_proc's parameter assertion in multiline_repl * Add rendering test for Ctrl-d exit https://github.com/ruby/reline/commit/46db71132a
2023-07-18[ruby/reline] Add missing `close` to test_rendering.rbtomoya ishida
(https://github.com/ruby/reline/pull/573) https://github.com/ruby/reline/commit/7cd817036e
2023-07-08[ruby/reline] Ignore unhandled escape sequencestomoya ishida
(https://github.com/ruby/reline/pull/522) * Add unassigned escape sequence matcher to KeyStroke * Do not insert ESC and unassigned ESC+key to input buffer
2023-07-07[ruby/reline] Reduce direct references to `Reline::IOGate`Stan Lo
(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
2023-07-05[ruby/reline] Fix wrong byte_pointer passed to auto_indent_proctomoya ishida
(https://github.com/ruby/reline/pull/562) https://github.com/ruby/reline/commit/4348354604
2023-05-27[ruby/reline] Fix scrolldown condition in dialog renderingtomoya ishida
(https://github.com/ruby/reline/pull/541) https://github.com/ruby/reline/commit/ad6faada3f
2023-05-27[ruby/reline] Use appropriate dialog height and reduce screen pushuptomoya ishida
problem (https://github.com/ruby/reline/pull/542) * Provide preferred_dialog_height for dialog positioning * Fix rendering test
2023-05-07[ruby/reline] Fix dialog corrupts rendering by pushing up input linetomoya ishida
too much (https://github.com/ruby/reline/pull/524) * Do not render dialog where it overflows screen * Dialog rendering should Scroll down only when needed * Refactor screen_y_range calculation Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/reline/commit/bc0e3d1310 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-05-01[ruby/reline] Rewrite dialog renderingtomoya ishida
(https://github.com/ruby/reline/pull/492) * Rewrite dialog rendering * Fix failing test of dialog with small screen * Add multiple-dialog rendering test * Add description comments for each part of render_dialog_changes
2023-03-27[ruby/reline] Fix cursor position overruntomoya ishida
(https://github.com/ruby/reline/pull/515) * Fix cursor position overrun * Remove unnecessary local variable Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/reline/commit/d4ad9b96c8 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-03-18[ruby/reline] Fix: line longer than terminal width breaks renderingtomoya ishida
(https://github.com/ruby/reline/pull/516) https://github.com/ruby/reline/commit/ae5f9b87ab
2023-03-04[ruby/reline] Fix completion with multilinetomoya ishida
(https://github.com/ruby/reline/pull/513) https://github.com/ruby/reline/commit/d76c482c5f
2023-02-27[ruby/reline] Fix wrong indent number in prompt. whole_lines hastomoya ishida
duplicated line. (https://github.com/ruby/reline/pull/460) * whole_lines should consider prev_line_index, and must not duplicate last_line * Add test for lines passed to dynamic prompt proc * Refactor whole_lines parameters used in test helper * Remove whole_line's arguments
2023-02-27[ruby/reline] Fix the cause of test_yamatanooroti randomly failingtomoya ishida
(https://github.com/ruby/reline/pull/474) * Add repeated input-delete test that fails on HEAD * Use raw mode while readmultiline
2023-02-06[ruby/reline] Fix line rendering when newline is added at the end of the buffertompng
https://github.com/ruby/reline/commit/7d61b3df9a