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/test-hist.rb
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
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 history commands
|
|
8
5
|
|
|
@@ -11,7 +8,6 @@ class TestHistory < Test::Unit::TestCase
|
|
|
11
8
|
@@SRC_DIR = File.dirname(__FILE__) unless
|
|
12
9
|
defined?(@@SRC_DIR)
|
|
13
10
|
|
|
14
|
-
require File.join(@@SRC_DIR, 'helper')
|
|
15
11
|
include TestHelper
|
|
16
12
|
|
|
17
13
|
unless defined?(@@FILE_HISTORY)
|
|
@@ -19,6 +15,9 @@ class TestHistory < Test::Unit::TestCase
|
|
|
19
15
|
end
|
|
20
16
|
|
|
21
17
|
def test_basic
|
|
18
|
+
# FIXME: Disable for now.
|
|
19
|
+
assert true, 'FIXME'
|
|
20
|
+
return
|
|
22
21
|
|
|
23
22
|
# Set up history file to read from.
|
|
24
23
|
ENV['HOME']=@@SRC_DIR
|
|
@@ -40,8 +39,8 @@ class TestHistory < Test::Unit::TestCase
|
|
|
40
39
|
|
|
41
40
|
# Now that we've set up a history file, run the debugger
|
|
42
41
|
# and check that it's reading that correctly.
|
|
43
|
-
debug_pgm=File.join(
|
|
44
|
-
debugged=File.join(
|
|
42
|
+
debug_pgm=File.join(%w(.. rdbg.rb))
|
|
43
|
+
debugged=File.join(%w(. example gcd.rb))
|
|
45
44
|
IO.popen("#{debug_pgm} #{debugged} 3 5 >#{debugger_output}", 'w') do
|
|
46
45
|
|pipe|
|
|
47
46
|
debugger_commands.each do |cmd|
|
|
@@ -51,9 +50,6 @@ class TestHistory < Test::Unit::TestCase
|
|
|
51
50
|
|
|
52
51
|
# Compare output
|
|
53
52
|
got_lines = File.read(@@FILE_HISTORY).split(/\n/)
|
|
54
|
-
# FIXME: Disable for now.
|
|
55
|
-
assert true, 'FIXME'
|
|
56
|
-
return
|
|
57
53
|
if cheap_diff(got_lines, correct_lines)
|
|
58
54
|
assert true
|
|
59
55
|
FileUtils.rm(debugger_output)
|
data/test/test-info-thread.rb
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
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 simple thread commands
|
|
8
5
|
class TestInfoThread < 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
9
|
testname='info-thread'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
s.sub!(/Thread:0x[0-9a-f]+/, 'Thread:0x12345678')
|
|
23
|
-
end
|
|
10
|
+
filter = Proc.new{|got_lines, correct_lines|
|
|
11
|
+
[got_lines, correct_lines].each do |a|
|
|
12
|
+
a.each do |s|
|
|
13
|
+
s.gsub!(/Thread:0x[0-9a-f]+/, 'Thread:0x12345678')
|
|
24
14
|
end
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
end
|
|
16
|
+
got_lines.each do |s|
|
|
17
|
+
s.gsub!(/run>[ \t]+.*gcd.rb:4/, "run> gcd.rb:4")
|
|
18
|
+
end
|
|
19
|
+
}
|
|
20
|
+
script = File.join('data', testname + '.cmd')
|
|
21
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5",
|
|
22
|
+
:filter => filter))
|
|
31
23
|
end
|
|
32
24
|
end
|
data/test/test-info-var.rb
CHANGED
|
@@ -1,47 +1,30 @@
|
|
|
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 info variables command
|
|
8
5
|
class TestInfoVar < 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_info_variables
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
a.each do |s|
|
|
26
|
-
s.sub!(/Lousy_inspect:0x[0-9,a-f]+/, 'Lousy_inspect:')
|
|
27
|
-
s.sub!(/UnsuspectingClass:0x[0-9,a-f]+/, 'UnsuspectingClass:')
|
|
28
|
-
end
|
|
9
|
+
filter = Proc.new{|got_lines, correct_lines|
|
|
10
|
+
[got_lines[13-1], correct_lines[13-1]].each do |s|
|
|
11
|
+
s.sub!(/Mine:0x[0-9,a-f]+/, 'Mine:')
|
|
12
|
+
end
|
|
13
|
+
[got_lines, correct_lines].each do |a|
|
|
14
|
+
a.each do |s|
|
|
15
|
+
s.sub!(/Lousy_inspect:0x[0-9,a-f]+/, 'Lousy_inspect:')
|
|
16
|
+
s.sub!(/UnsuspectingClass:0x[0-9,a-f]+/, 'UnsuspectingClass:')
|
|
29
17
|
end
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
run_debugger(testname,
|
|
42
|
-
"--script #{script} -- info-var-bug2.rb",
|
|
43
|
-
nil))
|
|
44
|
-
|
|
45
|
-
end
|
|
18
|
+
end
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
testname='info-var'
|
|
22
|
+
script = File.join('data', testname + '.cmd')
|
|
23
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/info-var-bug.rb",
|
|
24
|
+
:filter => filter))
|
|
25
|
+
|
|
26
|
+
testname='info-var-bug2'
|
|
27
|
+
script = File.join('data', testname + '.cmd')
|
|
28
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/info-var-bug2.rb"))
|
|
46
29
|
end
|
|
47
30
|
end
|
data/test/test-info.rb
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
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 info commands
|
|
8
5
|
class TestInfo < 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
|
# Test commands in info.rb
|
|
17
9
|
def test_basic
|
|
18
10
|
testname='info'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
filter = Proc.new{|got_lines, correct_lines|
|
|
12
|
+
got_lines.each do |s|
|
|
13
|
+
s.gsub!(/Line 4 of ".*gcd.rb"/, 'Line 4 of "gcd.rb"')
|
|
14
|
+
end
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
script = File.join('data', testname + '.cmd')
|
|
18
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5",
|
|
19
|
+
:filter => filter))
|
|
25
20
|
end
|
|
21
|
+
|
|
22
|
+
def test_file_break
|
|
23
|
+
testname='info-file-break'
|
|
24
|
+
script = File.join('data', testname + '.cmd')
|
|
25
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5"))
|
|
26
|
+
end unless defined?(JRUBY_VERSION) # JRuby doesn't yet support tracelines
|
|
26
27
|
end
|
data/test/test-list.rb
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
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 List commands
|
|
8
5
|
class TestList < Test::Unit::TestCase
|
|
9
|
-
|
|
10
|
-
@@src_dir = File.dirname(__FILE__)
|
|
11
|
-
|
|
12
|
-
require File.join(@@src_dir, 'helper')
|
|
13
6
|
include TestHelper
|
|
14
7
|
|
|
15
8
|
# Test commands in list.rb
|
|
16
9
|
def test_basic
|
|
17
10
|
testname='list'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
assert_equal(true,
|
|
21
|
-
run_debugger(testname,
|
|
22
|
-
"--script #{script} -- gcd.rb 3 5"))
|
|
23
|
-
end
|
|
11
|
+
script = File.join('data', testname + '.cmd')
|
|
12
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5"))
|
|
24
13
|
end
|
|
25
14
|
end
|
data/test/test-method.rb
CHANGED
|
@@ -1,34 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require
|
|
3
|
-
|
|
4
|
-
# require 'rubygems'
|
|
5
|
-
# require 'ruby-debug'; Debugger.start(:post_mortem => true)
|
|
2
|
+
require File.expand_path("../helper", __FILE__)
|
|
6
3
|
|
|
7
4
|
class TestMethod < Test::Unit::TestCase
|
|
8
|
-
|
|
9
|
-
@@SRC_DIR = File.dirname(__FILE__) unless
|
|
10
|
-
defined?(@@SRC_DIR)
|
|
11
|
-
|
|
12
|
-
require File.join(@@SRC_DIR, 'helper')
|
|
13
5
|
include TestHelper
|
|
14
6
|
|
|
15
7
|
def test_basic
|
|
16
8
|
testname='method'
|
|
17
|
-
|
|
9
|
+
script = File.join('data', testname + '.cmd')
|
|
10
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/classes.rb"))
|
|
11
|
+
begin
|
|
12
|
+
require 'methodsig'
|
|
13
|
+
testname='methodsig'
|
|
18
14
|
script = File.join('data', testname + '.cmd')
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
begin
|
|
23
|
-
require 'methodsig'
|
|
24
|
-
testname='methodsig'
|
|
25
|
-
script = File.join('data', testname + '.cmd')
|
|
26
|
-
assert_equal(true,
|
|
27
|
-
run_debugger(testname,
|
|
28
|
-
"--script #{script} -- classes.rb"))
|
|
29
|
-
rescue LoadError
|
|
30
|
-
puts "Skipping method sig test"
|
|
31
|
-
end
|
|
15
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/classes.rb"))
|
|
16
|
+
rescue LoadError
|
|
17
|
+
puts "Skipping method sig test"
|
|
32
18
|
end
|
|
33
19
|
end
|
|
34
20
|
end
|
data/test/test-output.rb
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
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 'starting' annotation.
|
|
8
5
|
class TestStartingAnnotate < 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
9
|
testname='output'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
assert_equal(true,
|
|
21
|
-
run_debugger(testname,
|
|
22
|
-
"-A 3 --script #{script} -- output.rb",
|
|
23
|
-
nil, nil, true))
|
|
24
|
-
end
|
|
10
|
+
script = File.join('data', testname + '.cmd')
|
|
11
|
+
assert(run_debugger(testname, "-A 3 --script #{script} -- ./example/output.rb"))
|
|
25
12
|
end
|
|
26
13
|
end
|
data/test/test-pm.rb
CHANGED
|
@@ -1,59 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require
|
|
3
|
-
require 'rbconfig'
|
|
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 Post-mortem command
|
|
9
5
|
class TestPM < Test::Unit::TestCase
|
|
10
|
-
|
|
11
|
-
@@SRC_DIR = File.dirname(__FILE__) unless
|
|
12
|
-
defined?(@@SRC_DIR)
|
|
13
|
-
|
|
14
|
-
require File.join(@@SRC_DIR, 'helper')
|
|
15
6
|
include TestHelper
|
|
16
7
|
|
|
17
8
|
# Test post-mortem handling
|
|
18
9
|
def test_basic
|
|
19
|
-
Dir.chdir(@@SRC_DIR) do
|
|
20
10
|
# filter = Proc.new{|got_lines, correct_lines|
|
|
21
11
|
# [got_lines[0], correct_lines[0]].each do |s|
|
|
22
12
|
# s.sub!(/tdebug.rb:\d+/, 'rdebug:999')
|
|
23
13
|
# end
|
|
24
14
|
# }
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
run_debugger(testname,
|
|
31
|
-
"--script #{script} --post-mortem pm.rb"))
|
|
32
|
-
end
|
|
15
|
+
ENV['COLUMNS'] = '80'
|
|
16
|
+
testname='post-mortem'
|
|
17
|
+
script = File.join('data', testname + '.cmd')
|
|
18
|
+
testname += '-osx' if Config::CONFIG['host_os'] =~ /^darwin/
|
|
19
|
+
assert(run_debugger(testname, "--script #{script} --post-mortem ./example/pm.rb"))
|
|
33
20
|
end
|
|
34
21
|
|
|
35
22
|
# Test post-mortem handling
|
|
36
23
|
def test_pm_next
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
assert_equal(true,
|
|
42
|
-
run_debugger(testname,
|
|
43
|
-
"--script #{script} --post-mortem pm.rb"))
|
|
44
|
-
end
|
|
24
|
+
ENV['COLUMNS'] = '80'
|
|
25
|
+
testname='post-mortem-next'
|
|
26
|
+
script = File.join('data', testname + '.cmd')
|
|
27
|
+
assert(run_debugger(testname, "--script #{script} --post-mortem ./example/pm.rb"))
|
|
45
28
|
end
|
|
46
|
-
|
|
29
|
+
|
|
47
30
|
# Test Tracker #22118 post-mortem giving an error in show internal variables
|
|
48
31
|
def test_pm_iv_bug
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
assert_equal(true,
|
|
54
|
-
run_debugger(testname,
|
|
55
|
-
"--script #{script} --post-mortem pm-bug.rb"))
|
|
56
|
-
end
|
|
32
|
+
ENV['COLUMNS'] = '80'
|
|
33
|
+
testname='pm-bug'
|
|
34
|
+
script = File.join('data', testname + '.cmd')
|
|
35
|
+
assert(run_debugger(testname, "--script #{script} --post-mortem example/pm-bug.rb"))
|
|
57
36
|
end
|
|
58
|
-
|
|
59
|
-
end
|
|
37
|
+
end unless defined?(JRUBY_VERSION) # post-mortem not yet supported on JRuby
|
data/test/test-quit.rb
CHANGED
|
@@ -1,30 +1,13 @@
|
|
|
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 Quit command
|
|
8
5
|
class TestQuit < 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
9
|
testname='quit'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# filter = Proc.new{|got_lines, correct_lines|
|
|
21
|
-
# [got_lines[0], correct_lines[0]].each do |s|
|
|
22
|
-
# s.sub!(/tdebug.rb:\d+/, 'rdebug:999')
|
|
23
|
-
# end
|
|
24
|
-
# }
|
|
25
|
-
assert_equal(true,
|
|
26
|
-
run_debugger(testname,
|
|
27
|
-
"--script #{script} -- null.rb"))
|
|
28
|
-
end
|
|
10
|
+
script = File.join('data', testname + '.cmd')
|
|
11
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb"))
|
|
29
12
|
end
|
|
30
13
|
end
|
data/test/test-raise.rb
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
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 Debugger.load handles uncaught exceptions in the debugged program.
|
|
8
5
|
class TestRaise < 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
9
|
testname='raise'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
assert_equal(true,
|
|
21
|
-
run_debugger(testname,
|
|
22
|
-
"--script #{script} -- raise.rb"))
|
|
23
|
-
end
|
|
10
|
+
script = File.join('data', testname + '.cmd')
|
|
11
|
+
assert(run_debugger(testname, "--script #{script} -- ./example/raise.rb"))
|
|
24
12
|
end
|
|
25
13
|
end
|