ruby/test/reline
Étienne Barrié 52ff2ce9da
Use `em_delete` in `key_delete` (#504)
* Test existing behavior

Typing Ctrl-D ends editing but typing <Del> does not.

Also renamed a test that is not testing ed_delete_next_char but
key_delete.

* Check if line empty first in em_delete

By distributivity of AND over OR, we can factor out this condition. This
will make the next commit simpler.

* Use em_delete in key_delete

When the editing mode is emacs, use `em_delete` in `key_delete`. We need
to add a condition though to `em_delete`, because it implements both
`delete-char` and `end-of-file`. We only want the `end-of-file` behavior
is the key is really Ctrl-D.

This matches the behavior of the <Del> key with readline, i.e. deleting
the next character if there is one, but not moving the cursor, while not
finishing the editing if there are no characters.
2023-04-05 08:59:12 +09:00
..
windows Tests for Windows can run only on Windows 2021-08-05 13:58:07 +09:00
yamatanooroti [ruby/reline] Fix cursor position overrun 2023-03-27 13:57:16 +00:00
helper.rb [ruby/reline] Fix wrong indent number in prompt. whole_lines has 2023-02-27 10:21:30 +00:00
test_ansi_with_terminfo.rb [ruby/reline] Add key bindings for PgUp and PgDn 2023-03-21 14:48:32 +00:00
test_ansi_without_terminfo.rb [ruby/reline] Reset IOGate in test_reset 2023-01-11 11:38:51 +00:00
test_config.rb [ruby/reline] Remove unapproved color setting APIs 2022-12-05 03:14:55 +00:00
test_history.rb Add detailed message to assert_external_string_equal 2021-06-23 21:00:48 +09:00
test_key_actor_emacs.rb Use `em_delete` in `key_delete` (#504) 2023-04-05 08:59:12 +09:00
test_key_actor_vi.rb [ruby/reline] use assert_nothing_raised 2022-09-22 22:28:39 +09:00
test_key_stroke.rb [ruby/reline] Add a test for key bindings with Reline::Key 2021-09-06 08:10:08 +09:00
test_kill_ring.rb [ruby/reline] Add Enumerable to KillRing for debugging 2020-12-19 02:12:11 +09:00
test_macro.rb Stop using global constant, RELINE_TEST_ENCODING 2021-06-21 22:12:14 +09:00
test_reline.rb [ruby/reline] test_dumb_terminal: "ruby" command is not always available 2023-02-05 20:31:37 +00:00
test_reline_key.rb [ruby/reline] Fix test class not to overwrite 2021-10-11 20:32:34 +09:00
test_string_processing.rb Stop using global constant, RELINE_TEST_ENCODING 2021-06-21 22:12:14 +09:00
test_terminfo.rb [ruby/reline] Check capname of tigetstr/tigetflag/tigetnum 2022-01-02 11:44:07 +09:00
test_unicode.rb [ruby/reline] Improve OSC sequence regexp. OSC sequence can end with 2023-03-29 06:54:08 +00:00
test_within_pipe.rb s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00