Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure to fail when remote debuggee does not exit after scenarios #818

Merged
merged 3 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions test/console/backtrace_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_backtrace_prints_c_method_frame
type 'c'
type 'bt'
assert_line_text(/\[C\] Integer#times/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -44,7 +44,7 @@ def test_backtrace_prints_the_return_value
type 'c'
type 'bt'
assert_line_text(/Foo#first_call .* #=> 30/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -54,7 +54,7 @@ def test_backtrace_prints_method_arguments
type 'c'
type 'bt'
assert_line_text(/Foo#second_call\(num=20\)/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -64,7 +64,7 @@ def test_backtrace_prints_block_arguments
type 'c'
type 'bt'
assert_line_text(/block {\|ten=10\|}/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -76,7 +76,7 @@ def test_backtrace_prints_a_given_number_of_traces
assert_line_text(/Foo#third_call_with_block/)
assert_line_text(/Foo#second_call/)
assert_no_line_text(/Foo#first_call/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -88,7 +88,7 @@ def test_backtrace_filters_traces_with_location
assert_line_text(/Foo#second_call/)
assert_line_text(/Foo#first_call/)
assert_no_line_text(/Foo#third_call_with_block/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -100,7 +100,7 @@ def test_backtrace_filters_traces_with_method_name
assert_line_text(/Foo#second_call/)
assert_no_line_text(/Foo#first_call/)
assert_no_line_text(/Foo#third_call_with_block/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -111,7 +111,7 @@ def test_backtrace_takes_both_number_and_pattern
type 'bt 1 /rb:\d\z/'
assert_line_text(/Foo#second_call/)
assert_no_line_text(/Foo#first_call/)
type 'q!'
type 'kill!'
end
end

Expand Down Expand Up @@ -166,7 +166,7 @@ def test_backtrace_prints_block_label_correctly
type 'c'
type 'bt'
assert_line_text(/block in <main> at/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -176,7 +176,7 @@ def test_backtrace_prints_nested_block_label_correctly
type 'c'
type 'bt'
assert_line_text(/block in <main> \(2 levels\) at/)
type 'q!'
type 'kill!'
end
end
end
Expand Down
22 changes: 11 additions & 11 deletions test/console/break_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_break_with_namespaced_instance_method_stops_at_correct_place
assert_line_text(/#0 BP - Method \(pending\) Foo::Bar#b/)
type 'continue'
assert_line_num 8
type 'quit!'
type 'kill!'
end
end

Expand All @@ -49,7 +49,7 @@ def test_break_with_namespaced_class_method_stops_at_correct_place
type 'break Foo::Bar.a'
type 'continue'
assert_line_num 4
type 'quit!'
type 'kill!'
end
end

Expand All @@ -58,7 +58,7 @@ def test_break_with_namespaced_module_method_stops_at_correct_place
type 'break Foo::Baz.c'
type 'continue'
assert_line_num 15
type 'quit!'
type 'kill!'
end
end

Expand All @@ -70,7 +70,7 @@ def test_break_with_a_method_does_not_stop_at_blocks_in_the_method
type 'break 9'
type 'continue'
assert_line_num 9
type 'quit!'
type 'kill!'
end
end

Expand All @@ -90,7 +90,7 @@ def test_break_command_isnt_repeatable
type 'break Foo::Baz.c'
type ''
assert_no_line_text(/duplicated breakpoint/)
type 'quit!'
type 'kill!'
end
end
end
Expand Down Expand Up @@ -502,7 +502,7 @@ def test_break_with_instance_method_stops_at_correct_place_a
type 'break Foo::Bar#a'
type 'continue'
assert_line_num 3
type 'quit!'
type 'kill!'
end
end

Expand All @@ -513,7 +513,7 @@ def test_break_with_instance_method_stops_at_correct_place_b
type 'break Foo::Bar#b'
type 'continue'
assert_line_num 6
type 'quit!'
type 'kill!'
end
end

Expand All @@ -522,7 +522,7 @@ def test_break_with_class_method_stops_at_correct_place
type 'break Foo::Bar.c'
type 'continue'
assert_line_num 9
type 'quit!'
type 'kill!'
end
end
end
Expand Down Expand Up @@ -663,7 +663,7 @@ def test_debugger_rejects_duplicated_line_breakpoints
assert_line_num 18
type 'continue'
assert_line_num 19
type 'quit!'
type 'kill!'
end
end

Expand All @@ -673,7 +673,7 @@ def test_break_with_colon_between_file_and_line_stops_at_correct_place
assert_line_text(/\#0 BP \- Line .*/)
type 'c'
assert_line_num 4
type 'q!'
type 'kill!'
end
end

Expand All @@ -683,7 +683,7 @@ def test_break_with_space_between_file_and_line_stops_at_correct_place
assert_line_text(/\#0 BP \- Line .*/)
type 'c'
assert_line_num 9
type 'q!'
type 'kill!'
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions test/console/catch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_debugger_stops_when_the_exception_raised
assert_line_text(/#0 BP - Catch "ZeroDivisionError"/)
type 'continue'
assert_line_text('Integer#/')
type 'q!'
type 'kill!'
end
end

Expand All @@ -29,7 +29,7 @@ def test_debugger_stops_when_child_exception_raised
type 'catch StandardError'
type 'continue'
assert_line_text('Integer#/')
type 'q!'
type 'kill!'
end
end

Expand All @@ -38,7 +38,7 @@ def test_catch_command_isnt_repeatable
type 'catch StandardError'
type ''
assert_no_line_text(/duplicated breakpoint/)
type 'q!'
type 'kill!'
end
end

Expand Down Expand Up @@ -110,7 +110,7 @@ def test_debugger_stops_when_the_exception_raised
assert_line_text('Integer#/')
type 's'
assert_line_text('Object#bar')
type 'q!'
type 'kill!'
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions test/console/config_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_config_show
assert_line_text([
/show_frames = \d+/
])
type 'q!'
type 'kill!'
end
end

Expand All @@ -47,7 +47,7 @@ def test_config_show_frames_set_with_eq
assert_line_text([
/ # and 2 frames \(use `bt' command for all frames\)/,
])
type 'q!'
type 'kill!'
end
end

Expand All @@ -64,7 +64,7 @@ def test_config_show_frames_set
assert_line_text([
/ # and 2 frames \(use `bt' command for all frames\)/,
])
type 'q!'
type 'kill!'
end
end
end
Expand Down Expand Up @@ -331,7 +331,7 @@ def test_p_with_keep_alloc_site
assert_line_text([
/allocated at/
])
type 'q!'
type 'kill!'
end
end
end
Expand Down
16 changes: 8 additions & 8 deletions test/console/control_flow_commands_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_finish_leaves_the_current_frame
assert_line_num 7
type 'fin'
assert_line_num 8
type 'q!'
type 'kill!'
end
end
end
Expand Down Expand Up @@ -194,7 +194,7 @@ def test_finish
assert_line_num 8
type 'finish'
assert_line_num 9
type 'q!'
type 'kill!'
end
end

Expand All @@ -205,7 +205,7 @@ def test_finish_0
assert_line_num 8
type 'fin 0'
assert_line_text(/finish command with 0 does not make sense/)
type 'q!'
type 'kill!'
end
end

Expand All @@ -216,7 +216,7 @@ def test_finish_1
assert_line_num 8
type 'fin 1'
assert_line_num 9
type 'q!'
type 'kill!'
end
end

Expand All @@ -227,7 +227,7 @@ def test_finish_2
assert_line_num 8
type 'fin 2'
assert_line_num 6
type 'q!'
type 'kill!'
end
end

Expand All @@ -238,7 +238,7 @@ def test_finish_3
assert_line_num 8
type 'fin 3'
assert_line_num 3
type 'q!'
type 'kill!'
end
end

Expand Down Expand Up @@ -485,7 +485,7 @@ def test_next
assert_line_num 13
type 'n'
assert_line_num 15
type 'q!'
type 'kill!'
end
end

Expand All @@ -498,7 +498,7 @@ def test_finish
assert_line_num 7
type 'fin'
assert_line_num 11
type 'q!'
type 'kill!'
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/console/debug_statement_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_breakpoint_fires_correctly
debug_code(program) do
type 'continue'
assert_line_text('Foo#bar')
type 'q!'
type 'kill!'
end
end
end
Expand Down Expand Up @@ -72,7 +72,7 @@ def test_debugger_doesnt_complain_about_duplicated_breakpoint
debug_code(program) do
type 'continue'
assert_no_line_text(/duplicated breakpoint:/)
type 'q!'
type 'kill!'
end
end
end
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_debugger_doesnt_complain_about_duplicated_breakpoint
debug_code(program) do
type 'continue'
assert_no_line_text(/duplicated breakpoint:/)
type 'q!'
type 'kill!'
end
end

Expand Down
4 changes: 2 additions & 2 deletions test/console/delete_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_delete_deletes_a_specific_breakpoint

type "continue"
assert_line_num(3)
type "q!"
type 'kill!'
end
end

Expand All @@ -56,7 +56,7 @@ def test_delete_keeps_current_breakpoints_if_not_confirmed
/\#0 BP \- Line .*/,
/\#1 BP \- Line .*/
])
type 'q!'
type 'kill!'
end
end
end
Expand Down
Loading