-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
187 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env ruby | ||
|
||
$:.unshift File.join(File.dirname(__FILE__), "..", "lib") | ||
|
||
require 'test_base' | ||
|
||
module CatchpointTest | ||
|
||
def test_catchpoint_basics | ||
create_socket ['sleep 0.01', '5/0', 'sleep 0.01'] | ||
run_to_line(1) | ||
send_next | ||
assert_suspension(@test_path, 2, 1) | ||
send_ruby('catch ZeroDivisionError') | ||
assert_catchpoint_set('ZeroDivisionError') | ||
send_next | ||
assert_exception(@test_path, 2, 'ZeroDivisionError') | ||
send_next | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env ruby | ||
|
||
$:.unshift File.join(File.dirname(__FILE__), "..", "lib") | ||
|
||
require 'test_base' | ||
|
||
module EnableDisableTest | ||
|
||
def test_enable_disable_basics | ||
create_socket ['1.upto(10) do', 'sleep 0.01', 'sleep 0.01', 'end'] | ||
|
||
send_test_breakpoint(2) | ||
assert_breakpoint_added_no(1) | ||
send_test_breakpoint(3) | ||
assert_breakpoint_added_no(2) | ||
|
||
start_debugger | ||
assert_test_breakpoint(2) | ||
send_cont | ||
assert_test_breakpoint(3) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_ruby('disable 2') | ||
assert_breakpoint_disabled(2) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_ruby('enable 2') | ||
assert_breakpoint_enabled(2) | ||
send_cont | ||
assert_test_breakpoint(3) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_cont | ||
assert_test_breakpoint(3) | ||
send_ruby('disable 1') | ||
assert_breakpoint_disabled(1) | ||
send_ruby('disable 2') | ||
assert_breakpoint_disabled(2) | ||
send_cont | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'rd_test_base' | ||
require 'catchpoint_test' | ||
|
||
class RDCatchpointTest < RDTestBase | ||
|
||
def test_catchpoint_basics | ||
create_socket ['sleep 0.01', '5/0', 'sleep 0.01'] | ||
run_to_line(1) | ||
send_next | ||
assert_suspension(@test_path, 2, 1) | ||
send_ruby('catch ZeroDivisionError') | ||
assert_catchpoint_set('ZeroDivisionError') | ||
send_next | ||
assert_exception(@test_path, 2, 'ZeroDivisionError') | ||
send_next | ||
end | ||
|
||
include CatchpointTest | ||
|
||
end | ||
|
||
class RDUNIXCatchpointTest < RDTestBase | ||
include TestBase::UseUNIXDomainSocket | ||
include CatchpointTest | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'rd_test_base' | ||
require 'enable_disable_test' | ||
|
||
class RDEnableDisableTest < RDTestBase | ||
|
||
def test_enable_disable_basics | ||
create_socket ['1.upto(10) do', 'sleep 0.01', 'sleep 0.01', 'end'] | ||
|
||
send_test_breakpoint(2) | ||
assert_breakpoint_added_no(1) | ||
send_test_breakpoint(3) | ||
assert_breakpoint_added_no(2) | ||
|
||
start_debugger | ||
assert_test_breakpoint(2) | ||
send_cont | ||
assert_test_breakpoint(3) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_ruby('disable 2') | ||
assert_breakpoint_disabled(2) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_ruby('enable 2') | ||
assert_breakpoint_enabled(2) | ||
send_cont | ||
assert_test_breakpoint(3) | ||
send_cont | ||
assert_test_breakpoint(2) | ||
send_cont | ||
assert_test_breakpoint(3) | ||
send_ruby('disable 1') | ||
assert_breakpoint_disabled(1) | ||
send_ruby('disable 2') | ||
assert_breakpoint_disabled(2) | ||
send_cont | ||
end | ||
include EnableDisableTest | ||
|
||
end | ||
|
||
class RDUNIXEnableDisableTest < RDTestBase | ||
include TestBase::UseUNIXDomainSocket | ||
include EnableDisableTest | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.