ruby-debug 0.10.4 → 0.10.5.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/AUTHORS +5 -0
- data/CHANGES +17 -0
- data/ChangeLog +6086 -3711
- data/README +39 -0
- data/Rakefile +67 -82
- data/cli/ruby-debug/commands/breakpoints.rb +4 -2
- data/cli/ruby-debug/commands/edit.rb +3 -2
- data/cli/ruby-debug/commands/info.rb +5 -4
- data/cli/ruby-debug/commands/irb.rb +7 -8
- data/cli/ruby-debug/commands/list.rb +1 -1
- data/cli/ruby-debug/commands/set.rb +7 -1
- data/cli/ruby-debug/commands/show.rb +8 -3
- data/cli/ruby-debug/processor.rb +10 -4
- data/doc/rdebug.1 +1 -1
- data/rdbg.rb +1 -1
- data/test/base/base.rb +7 -4
- data/test/base/binding.rb +3 -12
- data/test/base/catchpoint.rb +2 -9
- data/test/base/load.rb +18 -14
- data/test/base/reload_bug.rb +2 -2
- data/test/cli/commands/catchpoint_test.rb +1 -13
- data/test/cli/commands/unit/regexp.rb +2 -8
- data/test/data/annotate.cmd +2 -2
- data/test/data/annotate.right +8 -8
- data/test/data/at-exit.cmd +4 -0
- data/test/data/at-exit.right +12 -0
- data/test/data/break_bad.cmd +3 -5
- data/test/data/break_bad.right +4 -6
- data/test/data/break_tracelines.cmd +9 -0
- data/test/data/break_tracelines.right +17 -0
- data/test/data/breakpoints-basename.cmd +2 -0
- data/test/data/breakpoints-basename.right +10 -0
- data/test/data/breakpoints.cmd +0 -1
- data/test/data/breakpoints.right +1 -3
- data/test/data/catch.cmd +1 -0
- data/test/data/catch.right +2 -0
- data/test/data/continue_bad.cmd +4 -0
- data/test/data/continue_bad.right +9 -0
- data/test/data/ctrl.right +2 -1
- data/test/data/dollar-0.right +3 -2
- data/test/data/dollar-0a.right +1 -0
- data/test/data/dollar-0b.right +1 -0
- data/test/data/edit.cmd +1 -1
- data/test/data/edit.right +4 -4
- data/test/data/emacs_basic.cmd +1 -34
- data/test/data/emacs_basic.right +10 -92
- data/test/data/frame.cmd +0 -3
- data/test/data/frame.right +0 -4
- data/test/data/info-file-break.cmd +4 -0
- data/test/data/info-file-break.right +11 -0
- data/test/data/info-thread.right +4 -4
- data/test/data/info-var-bug2.right +2 -2
- data/test/data/info.cmd +0 -1
- data/test/data/info.right +1 -5
- data/test/data/linetrace-jruby.right +23 -0
- data/test/data/list.right +13 -13
- data/test/data/output.right +4 -4
- data/test/data/post-mortem-osx.right +5 -4
- data/test/data/quit.right +9 -0
- data/test/data/raise-jruby.right +26 -0
- data/test/data/raise.right +1 -1
- data/test/data/save.cmd +1 -0
- data/test/data/save.right +4 -2
- data/test/data/stepping.cmd +2 -2
- data/test/data/stepping.right +4 -4
- data/test/data/test-init.right +2 -2
- data/test/data/trace-jruby.right +14 -0
- data/test/example/a/example.rb +1 -0
- data/test/example/at-exit.rb +3 -0
- data/test/example/b/example.rb +1 -0
- data/test/{bp_loop_issue.rb → example/bp_loop_issue.rb} +0 -0
- data/test/example/breakpoints-basename.rb +2 -0
- data/test/{brkpt-class-bug.rb → example/brkpt-class-bug.rb} +0 -0
- data/test/{classes.rb → example/classes.rb} +0 -0
- data/test/{dollar-0.rb → example/dollar-0.rb} +1 -0
- data/test/{except-bug1.rb → example/except-bug1.rb} +0 -0
- data/test/file with space.rb b/data/test/example/file with → space.rb +0 -0
- data/test/{gcd.rb → example/gcd.rb} +0 -0
- data/test/{info-var-bug.rb → example/info-var-bug.rb} +0 -0
- data/test/{info-var-bug2.rb → example/info-var-bug2.rb} +0 -0
- data/test/{null.rb → example/null.rb} +0 -0
- data/test/{output.rb → example/output.rb} +0 -0
- data/test/{pm-bug.rb → example/pm-bug.rb} +0 -0
- data/test/{pm.rb → example/pm.rb} +0 -0
- data/test/{raise.rb → example/raise.rb} +0 -0
- data/test/helper.rb +52 -34
- data/test/rdebug-save.1 +2 -2
- data/test/test-annotate.rb +4 -16
- data/test/test-at-exit.rb +13 -0
- data/test/test-break-bad.rb +14 -25
- data/test/test-breakpoints.rb +13 -14
- data/test/test-brkpt-class-bug.rb +3 -16
- data/test/test-catch.rb +3 -15
- data/test/test-condition.rb +3 -15
- data/test/test-display.rb +3 -15
- data/test/test-dollar-0.rb +23 -35
- data/test/test-edit.rb +4 -16
- data/test/test-emacs-basic.rb +4 -17
- data/test/test-enable.rb +3 -15
- data/test/test-except-bug1.rb +6 -21
- data/test/test-file-with-space.rb +3 -15
- data/test/test-finish.rb +11 -23
- data/test/test-frame.rb +14 -20
- data/test/test-hist.rb +6 -10
- data/test/test-info-thread.rb +13 -21
- data/test/test-info-var.rb +20 -37
- data/test/test-info.rb +16 -15
- data/test/test-list.rb +3 -14
- data/test/test-method.rb +9 -23
- data/test/test-output.rb +3 -16
- data/test/test-pm.rb +16 -38
- data/test/test-quit.rb +3 -20
- data/test/test-raise.rb +3 -15
- data/test/test-save.rb +12 -21
- data/test/test-setshow.rb +3 -15
- data/test/test-source.rb +3 -15
- data/test/test-stepping.rb +3 -15
- data/test/test-trace.rb +22 -45
- metadata +199 -159
- data/VERSION +0 -3
- data/cli/ruby-debug/commands/continue.RB +0 -48
- data/cli/ruby-debug/commands/disassemble.RB +0 -38
- data/cli/ruby-debug/commands/raise.RB +0 -41
- data/cli/ruby-debug/commands/source.RB +0 -44
- data/cli/ruby-debug/processor.RB +0 -484
- data/runner.sh +0 -7
- data/test/except-bug2.rb +0 -7
- data/test/scope-test.rb +0 -8
- data/test/tvar.rb +0 -3
data/test/data/output.right
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
No breakpoints.
|
|
5
5
|
|
|
6
6
|
stack
|
|
7
|
-
--> #0 at line output.rb:1
|
|
7
|
+
--> #0 at line example/output.rb:1
|
|
8
8
|
|
|
9
9
|
variables
|
|
10
10
|
self = main
|
|
11
11
|
|
|
12
|
-
source output.rb:1
|
|
12
|
+
source example/output.rb:1
|
|
13
13
|
puts "one"
|
|
14
14
|
# # ********************************************************
|
|
15
15
|
# # This tests the "starting" annotation
|
|
@@ -19,12 +19,12 @@ puts "one"
|
|
|
19
19
|
one
|
|
20
20
|
stopped
|
|
21
21
|
stack
|
|
22
|
-
--> #0 at line output.rb:2
|
|
22
|
+
--> #0 at line example/output.rb:2
|
|
23
23
|
|
|
24
24
|
variables
|
|
25
25
|
self = main
|
|
26
26
|
|
|
27
|
-
source output.rb:2
|
|
27
|
+
source example/output.rb:2
|
|
28
28
|
puts "two"
|
|
29
29
|
# step
|
|
30
30
|
starting
|
|
@@ -23,9 +23,10 @@ Exception: #<ZeroDivisionError: divided by 0>
|
|
|
23
23
|
Type 'help <command-name>' for help on a specific command
|
|
24
24
|
|
|
25
25
|
Available commands:
|
|
26
|
-
backtrace delete
|
|
27
|
-
break disable
|
|
28
|
-
catch display
|
|
29
|
-
condition down
|
|
26
|
+
backtrace delete enable info p reload source up
|
|
27
|
+
break disable eval irb pp restart thread var
|
|
28
|
+
catch display exit kill ps save tmate where
|
|
29
|
+
condition down frame list putl set trace
|
|
30
|
+
continue edit help method quit show undisplay
|
|
30
31
|
|
|
31
32
|
# quit
|
data/test/data/quit.right
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
gcd.rb:4
|
|
2
|
+
def gcd(a, b)
|
|
3
|
+
# # ***************************************************
|
|
4
|
+
# # This tests the quit.
|
|
5
|
+
# # ***************************************************
|
|
6
|
+
# set debuggertesting on
|
|
7
|
+
Currently testing the debugger is on.
|
|
8
|
+
# # FIXME need to test --no-quit.
|
|
9
|
+
# quit
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
raise.rb:3
|
|
2
|
+
raise "abc"
|
|
3
|
+
# # ********************************************************
|
|
4
|
+
# # This tests that the debugger doesn't step into itself
|
|
5
|
+
# # when the application doesn't terminate the right way.
|
|
6
|
+
# # ********************************************************
|
|
7
|
+
# set debuggertesting on
|
|
8
|
+
Currently testing the debugger is on.
|
|
9
|
+
# catch x
|
|
10
|
+
NameError Exception: undefined local variable or method `x' for main:Object
|
|
11
|
+
# catch ZeroDivisionError
|
|
12
|
+
Catch exception ZeroDivisionError.
|
|
13
|
+
# info catch
|
|
14
|
+
ZeroDivisionError
|
|
15
|
+
# catch 5
|
|
16
|
+
Warning 5 is not known to be a Class
|
|
17
|
+
Catch exception 5.
|
|
18
|
+
# step
|
|
19
|
+
./example/raise.rb:3:in `(root)'
|
|
20
|
+
org/jruby/debug/RubyDebugger.java:204:in `debug_load'
|
|
21
|
+
./example/raise.rb:61:in `debug_program'
|
|
22
|
+
./tdebug.rb:251:in `(root)'
|
|
23
|
+
org/jruby/RubyKernel.java:1063:in `load'
|
|
24
|
+
./tdebug.rb:23:in `runner'
|
|
25
|
+
../rdbg.rb:32:in `(root)'
|
|
26
|
+
Uncaught exception: abc
|
data/test/data/raise.right
CHANGED
data/test/data/save.cmd
CHANGED
data/test/data/save.right
CHANGED
|
@@ -30,6 +30,8 @@ basename is off.
|
|
|
30
30
|
Currently testing the debugger is on.
|
|
31
31
|
autolist is off.
|
|
32
32
|
autoirb is off.
|
|
33
|
+
# set basename off
|
|
34
|
+
basename is off.
|
|
33
35
|
# info break
|
|
34
36
|
No breakpoints.
|
|
35
37
|
# # Now try saving something interesting
|
|
@@ -40,7 +42,7 @@ Catch exception RuntimeError.
|
|
|
40
42
|
# save temp
|
|
41
43
|
Saved to 'temp'
|
|
42
44
|
# eval File.open("temp").readlines
|
|
43
|
-
["break gcd.rb:10\n", "catch RuntimeError\n", "set autoeval off\n", "set basename
|
|
45
|
+
["break gcd.rb:10\n", "catch RuntimeError\n", "set autoeval off\n", "set basename off\n", "set debuggertesting on\n", "set autolist off\n", "set autoirb off\n"]
|
|
44
46
|
# # FIXME: The below is broken
|
|
45
47
|
# ## Change parameters above
|
|
46
48
|
# ## catch RuntimeError off
|
|
@@ -50,7 +52,7 @@ Saved to 'temp'
|
|
|
50
52
|
Breakpoint 2 file gcd.rb, line 10
|
|
51
53
|
Catch exception RuntimeError.
|
|
52
54
|
autoeval is off.
|
|
53
|
-
basename is
|
|
55
|
+
basename is off.
|
|
54
56
|
Currently testing the debugger is on.
|
|
55
57
|
autolist is off.
|
|
56
58
|
autoirb is off.
|
data/test/data/stepping.cmd
CHANGED
data/test/data/stepping.right
CHANGED
|
@@ -14,13 +14,13 @@ gcd(3,5)
|
|
|
14
14
|
--> #0 at line gcd.rb:18
|
|
15
15
|
# step a
|
|
16
16
|
Step argument 'a' needs to be a number.
|
|
17
|
-
# set
|
|
18
|
-
|
|
17
|
+
# set different on
|
|
18
|
+
different-line stepping is on.
|
|
19
19
|
# step- ; step-
|
|
20
20
|
gcd.rb:6
|
|
21
21
|
if a > b
|
|
22
|
-
# set
|
|
23
|
-
|
|
22
|
+
# set diff off
|
|
23
|
+
different-line stepping is off.
|
|
24
24
|
# where
|
|
25
25
|
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
|
26
26
|
#1 at line gcd.rb:18
|
data/test/data/test-init.right
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Tracing(1):gcd.rb:4 def gcd(a, b)
|
|
2
|
+
Tracing(1):gcd.rb:18 gcd(3,5)
|
|
3
|
+
Tracing(1):gcd.rb:6 if a > b
|
|
4
|
+
Tracing(1):gcd.rb:10 return nil if a <= 0
|
|
5
|
+
Tracing(1):gcd.rb:12 if a == 1 or b-a == 0
|
|
6
|
+
Tracing(1):gcd.rb:15 return gcd(b-a, a)
|
|
7
|
+
Tracing(1):gcd.rb:6 if a > b
|
|
8
|
+
Tracing(1):gcd.rb:10 return nil if a <= 0
|
|
9
|
+
Tracing(1):gcd.rb:12 if a == 1 or b-a == 0
|
|
10
|
+
Tracing(1):gcd.rb:15 return gcd(b-a, a)
|
|
11
|
+
Tracing(1):gcd.rb:6 if a > b
|
|
12
|
+
Tracing(1):gcd.rb:10 return nil if a <= 0
|
|
13
|
+
Tracing(1):gcd.rb:12 if a == 1 or b-a == 0
|
|
14
|
+
Tracing(1):gcd.rb:13 return a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
puts "a"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
puts "b"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/helper.rb
CHANGED
|
@@ -1,50 +1,62 @@
|
|
|
1
1
|
# Some common routines used in testing.
|
|
2
2
|
|
|
3
|
+
require 'rubygems'
|
|
4
|
+
require 'test/unit'
|
|
5
|
+
|
|
6
|
+
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
|
|
7
|
+
$LOAD_PATH.unshift File.expand_path("../../cli", __FILE__)
|
|
8
|
+
require 'ruby-debug'
|
|
9
|
+
|
|
3
10
|
require 'fileutils'
|
|
4
11
|
require 'yaml'
|
|
5
|
-
# require 'diff/lcs'
|
|
6
|
-
# require 'diff/lcs/hunk'
|
|
7
12
|
|
|
8
13
|
# begin require 'rubygems' rescue LoadError end
|
|
9
14
|
# require 'ruby-debug'; Debugger.start
|
|
10
15
|
|
|
11
16
|
module TestHelper
|
|
17
|
+
def run_debugger(testname, args = '', opts = {})
|
|
18
|
+
Dir.chdir(File.dirname(__FILE__)) do
|
|
19
|
+
rightfile = opts[:rightfile] || rightfile(testname)
|
|
20
|
+
outfile = opts[:outfile] || "#{testname}.out"
|
|
21
|
+
debug_pgm = opts[:runner] || 'tdebug.rb'
|
|
22
|
+
filter = opts[:filter]
|
|
12
23
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
rightfile = File.join('data', "#{testname}.right")
|
|
17
|
-
|
|
18
|
-
outfile = "#{testname}.out" unless outfile
|
|
24
|
+
if File.exists?(outfile)
|
|
25
|
+
FileUtils.rm(outfile)
|
|
26
|
+
end
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
ENV['RDEBUG'] = debug_pgm
|
|
25
|
-
ENV['TERM'] = ''
|
|
28
|
+
ENV['RDEBUG'] = debug_pgm
|
|
29
|
+
ENV['TERM'] = ''
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
# The EMACS environment variable(s) cause output to
|
|
32
|
+
# get prefaced with null which will mess up file compares.
|
|
33
|
+
# So turn off EMACS output processing.
|
|
34
|
+
ENV['EMACS'] = ENV['INSIDE_EMACS'] = nil
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
cmd = "#{load_ruby} #{load_params} ../rdbg.rb #{args} > #{outfile}"
|
|
37
|
+
puts "'#{cmd}'" if $DEBUG
|
|
38
|
+
`#{cmd}`
|
|
39
|
+
|
|
40
|
+
got_lines = File.read(outfile).split(/\n/)
|
|
41
|
+
correct_lines = File.read(rightfile).split(/\n/)
|
|
42
|
+
filter.call(got_lines, correct_lines) if filter
|
|
43
|
+
|
|
44
|
+
if cheap_diff(got_lines, correct_lines)
|
|
45
|
+
FileUtils.rm(outfile)
|
|
46
|
+
return true
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
false
|
|
36
50
|
end
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return true
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def rightfile(testname)
|
|
54
|
+
jruby_file = File.join('data', "#{testname}-jruby.right")
|
|
55
|
+
if defined?(JRUBY_VERSION) && File.exists?(jruby_file)
|
|
56
|
+
jruby_file
|
|
57
|
+
else
|
|
58
|
+
File.join('data', "#{testname}.right")
|
|
46
59
|
end
|
|
47
|
-
return false
|
|
48
60
|
end
|
|
49
61
|
|
|
50
62
|
def cheap_diff(got_lines, correct_lines)
|
|
@@ -77,7 +89,7 @@ module TestHelper
|
|
|
77
89
|
# this kind of test.
|
|
78
90
|
def add_test(base_name, src_dir, script_name=nil, cmd=nil, test_name=nil)
|
|
79
91
|
puts "+++ Adding #{base_name} ++++" if $DEBUG
|
|
80
|
-
test_name = base_name unless test_name
|
|
92
|
+
test_name = File.join('.', 'example', base_name) unless test_name
|
|
81
93
|
script_name = File.join('data', test_name + '.cmd') unless script_name
|
|
82
94
|
cmd = 'gcd.rb 3 5' unless cmd
|
|
83
95
|
eval <<-EOF
|
|
@@ -128,7 +140,13 @@ module TestHelper
|
|
|
128
140
|
# Loads key from the _config_._yaml_ file.
|
|
129
141
|
def config_load(key, may_be_nil=false, default_value='')
|
|
130
142
|
conf = File.join('config.private.yaml') # try private first
|
|
131
|
-
|
|
143
|
+
unless File.exists?(conf)
|
|
144
|
+
if defined?(JRUBY_VERSION)
|
|
145
|
+
conf = File.join('config.jruby.yaml')
|
|
146
|
+
else
|
|
147
|
+
conf = File.join('config.yaml')
|
|
148
|
+
end
|
|
149
|
+
end
|
|
132
150
|
value = YAML.load_file(conf)[key]
|
|
133
151
|
assert_not_nil(value, "#{key} is set in config.yaml") unless may_be_nil
|
|
134
152
|
value || default_value
|
data/test/rdebug-save.1
CHANGED
data/test/test-annotate.rb
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
|
|
5
|
-
# begin require 'rubygems' rescue LoadError end
|
|
6
|
-
# require 'ruby-debug'; Debugger.start
|
|
2
|
+
require File.expand_path("../helper", __FILE__)
|
|
7
3
|
|
|
8
4
|
# Test annotate handling.
|
|
9
5
|
class TestAnnotate < Test::Unit::TestCase
|
|
10
|
-
@@SRC_DIR = File.dirname(__FILE__) unless
|
|
11
|
-
defined?(@@SRC_DIR)
|
|
12
|
-
|
|
13
|
-
require File.join(@@SRC_DIR, 'helper')
|
|
14
6
|
include TestHelper
|
|
15
7
|
|
|
16
8
|
def test_basic
|
|
17
|
-
testname='annotate'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
assert_equal(true,
|
|
21
|
-
run_debugger(testname,
|
|
22
|
-
"--script #{script} -- gcd.rb 3 5"))
|
|
23
|
-
end
|
|
9
|
+
testname = 'annotate'
|
|
10
|
+
script = File.join('data', testname + '.cmd')
|
|
11
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5"))
|
|
24
12
|
end
|
|
25
13
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require File.expand_path("../helper", __FILE__)
|
|
3
|
+
|
|
4
|
+
# Test that it's possible to stop at breakpoints in an at_exit block.
|
|
5
|
+
class TestAtExit < Test::Unit::TestCase
|
|
6
|
+
include TestHelper
|
|
7
|
+
|
|
8
|
+
def test_basic
|
|
9
|
+
testname = 'at-exit'
|
|
10
|
+
script = File.join('data', testname + '.cmd')
|
|
11
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/at-exit.rb"))
|
|
12
|
+
end
|
|
13
|
+
end
|
data/test/test-break-bad.rb
CHANGED
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require
|
|
3
|
-
|
|
4
|
-
# begin require 'rubygems' rescue LoadError end
|
|
5
|
-
# require 'ruby-debug'; Debugger.start
|
|
2
|
+
require File.expand_path("../helper", __FILE__)
|
|
6
3
|
|
|
7
4
|
# Test (mostly) invalid breakpoint commands
|
|
8
5
|
class TestBadBreak < Test::Unit::TestCase
|
|
9
|
-
|
|
10
|
-
@@SRC_DIR = File.dirname(__FILE__) unless
|
|
11
|
-
defined?(@@SRC_DIR)
|
|
12
|
-
|
|
13
|
-
require File.join(@@SRC_DIR, 'helper')
|
|
14
6
|
include TestHelper
|
|
15
7
|
|
|
16
8
|
def test_basic
|
|
17
|
-
testname='break_bad'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
assert_equal(true,
|
|
21
|
-
run_debugger(testname,
|
|
22
|
-
"--script #{script} -- gcd.rb 3 5"))
|
|
23
|
-
end
|
|
9
|
+
testname = 'break_bad'
|
|
10
|
+
script = File.join('data', testname + '.cmd')
|
|
11
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5"))
|
|
24
12
|
end
|
|
25
|
-
|
|
13
|
+
|
|
14
|
+
def test_tracelines
|
|
15
|
+
testname = 'break_tracelines'
|
|
16
|
+
script = File.join('data', testname + '.cmd')
|
|
17
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5"))
|
|
18
|
+
end unless defined?(JRUBY_VERSION) # JRuby doesn't yet support tracelines
|
|
19
|
+
|
|
26
20
|
def test_break_loop
|
|
27
|
-
testname='break_loop_bug'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
assert_equal(true,
|
|
31
|
-
run_debugger(testname,
|
|
32
|
-
"--script #{script} -- bp_loop_issue.rb"))
|
|
33
|
-
end
|
|
21
|
+
testname = 'break_loop_bug'
|
|
22
|
+
script = File.join('data', testname + '.cmd')
|
|
23
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/bp_loop_issue.rb"))
|
|
34
24
|
end
|
|
35
|
-
|
|
36
25
|
end
|