Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 146
Update protocol tests#720
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # frozen_string_literal: true | ||
| require_relative '../support/protocol_test_case' | ||
| module DEBUGGER__ | ||
| class DisconnectDAPTest < ProtocolTestCase | ||
| PROGRAM = <<~RUBY | ||
| 1| module Foo | ||
| 2| class Bar | ||
| 3| def self.a | ||
| 4| "hello" | ||
| 5| end | ||
| 6| end | ||
| 7| loop do | ||
| 8| b = 1 | ||
| 9| end | ||
| 10| Bar.a | ||
| 11| bar = Bar.new | ||
| 12| end | ||
| RUBY | ||
| def test_disconnect_without_terminateDebuggee_keeps_debuggee_alive | ||
| run_protocol_scenario PROGRAM, cdp: false do | ||
| req_dap_disconnect(terminate_debuggee: false) | ||
| attach_to_dap_server | ||
| assert_reattached | ||
| # suspends the debuggee so it'll take the later requests (include terminate) | ||
| suspend_debugee | ||
| req_terminate_debuggee | ||
| end | ||
| end | ||
| def test_disconnect_with_terminateDebuggee_kills_debuggee | ||
| run_protocol_scenario PROGRAM, cdp: false do | ||
| req_dap_disconnect(terminate_debuggee: true) | ||
| end | ||
| end | ||
| private | ||
| def suspend_debugee | ||
| send_dap_request "pause", threadId: 1 | ||
| end | ||
| def assert_reattached | ||
st0012 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| res = find_crt_dap_response | ||
| result_cmd = res.dig(:command) | ||
| assert_equal 'configurationDone', result_cmd | ||
| end | ||
| end | ||
| end | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.