Skip to content

Commit

Permalink
Remove invalid byte sequence input from rendering test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tompng committed Jan 5, 2025
1 parent d0c06f5 commit c7b8dac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/reline/yamatanooroti/test_rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def test_bracketed_paste_with_undo_redo
Multiline REPL.
prompt> abc
EOC
write("\M-\C-_")
write("\e\C-_")
assert_screen(<<~EOC)
Multiline REPL.
prompt> abcdef hoge
Expand Down Expand Up @@ -853,7 +853,7 @@ def test_reset_rest_height_when_clear_screen

def test_meta_key
start_terminal(30, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write("def ge\M-bho")
write("def ge\ebho")
assert_screen(<<~EOC)
Multiline REPL.
prompt> def hoge
Expand All @@ -874,7 +874,7 @@ def test_not_meta_key
def test_force_enter
start_terminal(30, 120, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write("def hoge\nend\C-p\C-e")
write("\M-\x0D")
write("\e\x0D")
assert_screen(<<~EOC)
Multiline REPL.
prompt> def hoge
Expand Down Expand Up @@ -919,7 +919,7 @@ def test_eof_without_newline

def test_em_set_mark_and_em_exchange_mark
start_terminal(10, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write("aaa bbb ccc ddd\M-b\M-b\M-\x20\M-b\C-x\C-xX\C-x\C-xY")
write("aaa bbb ccc ddd\eb\eb\e\x20\eb\C-x\C-xX\C-x\C-xY")
assert_screen(<<~'EOC')
Multiline REPL.
prompt> aaa Ybbb Xccc ddd
Expand Down Expand Up @@ -1519,7 +1519,7 @@ def test_dialog_with_fullwidth_scrollbar
def test_rerender_argument_prompt_after_pasting
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write('abcdef')
write("\M-3\C-h")
write("\e3\C-h")
assert_screen(<<~'EOC')
Multiline REPL.
prompt> abc
Expand Down Expand Up @@ -1655,7 +1655,7 @@ def test_insert_newline_in_the_middle_of_buffer_just_after_dialog
write("class A\n def a\n 3\n end\nend")
write("\n")
write("\C-p\C-p\C-p\C-p\C-p\C-e\C-hS")
write("\M-\x0D")
write("\e\x0D")
write(" 3")
assert_screen(<<~'EOC')
prompt> 3
Expand Down

0 comments on commit c7b8dac

Please sign in to comment.