summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2025-01-03 23:27:39 +0900
committergit <svn-admin@ruby-lang.org>2025-01-03 14:27:44 +0000
commitfa0478d35509c28c2ab3d3af9bb40a523920992e (patch)
tree919a63c65449984ca2ab1994246ab67dcaa5ddaa /test
parentc22b0598b0dd197a49212e06cfc91e4a3f2e058c (diff)
[ruby/reline] Refactor handling key in LineEditor
(https://github.com/ruby/reline/pull/799) Simplify the complicated flow of waiting_proc, wrap_method_call and run_for_operation https://github.com/ruby/reline/commit/72c0ec0425
Diffstat (limited to 'test')
-rw-r--r--test/reline/test_key_actor_emacs.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb
index e52c6c2d9a..190a41d735 100644
--- a/test/reline/test_key_actor_emacs.rb
+++ b/test/reline/test_key_actor_emacs.rb
@@ -1502,6 +1502,16 @@ class Reline::KeyActor::EmacsTest < Reline::TestCase
assert_line_around_cursor('abcd', '')
end
+ def test_ed_digit_with_ed_argument_digit
+ input_keys('1' * 30)
+ assert_line_around_cursor('1' * 30, '')
+ input_keys("\M-2", false)
+ input_keys('3')
+ input_keys("\C-h", false)
+ input_keys('4')
+ assert_line_around_cursor('1' * 7 + '4', '')
+ end
+
def test_halfwidth_kana_width_dakuten
omit "This test is for UTF-8 but the locale is #{Reline.core.encoding}" if Reline.core.encoding != Encoding::UTF_8
input_raw_keys('ガギゲゴ')