ruby-debug-base19x 0.11.25.jb3 → 0.11.25

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/test/base/base.rb CHANGED
@@ -1,74 +1,74 @@
1
- #!/usr/bin/env ruby
2
- require 'test/unit'
3
-
4
- # Some tests of Debugger module in C extension ruby_debug
5
- class TestRubyDebug < Test::Unit::TestCase
6
- $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
7
- require 'ruby_debug'
8
- $:.shift
9
-
10
- # test current_context
11
- def test_current_context
12
- assert_equal(false, Debugger.started?,
13
- 'debugger should not initially be started.')
14
- Debugger.start_
15
- assert(Debugger.started?,
16
- 'debugger should now be started.')
17
- assert_equal(__LINE__, Debugger.current_context.frame_line)
18
- assert_equal(nil, Debugger.current_context.frame_args_info,
19
- 'no frame args info.')
20
- assert_equal(Debugger.current_context.frame_file,
21
- Debugger.current_context.frame_file(0))
22
- assert_equal(File.basename(__FILE__),
23
- File.basename(Debugger.current_context.frame_file))
24
- assert_raises(ArgumentError) {Debugger.current_context.frame_file(1, 2)}
25
- assert_raises(ArgumentError) {Debugger.current_context.frame_file(10)}
26
- assert_equal(1, Debugger.current_context.stack_size)
27
- assert_equal(TestRubyDebug, Debugger.current_context.frame_class)
28
- assert_equal(false, Debugger.current_context.dead?, 'Not dead yet!')
29
- Debugger.stop
30
- assert_equal(false, Debugger.started?,
31
- 'Debugger should no longer be started.')
32
- end
33
-
34
- # Test initial variables and setting/getting state.
35
- def test_debugger_base
36
- assert_equal(false, Debugger.started?,
37
- 'Debugger should not initially be started.')
38
- Debugger.start_
39
- assert(Debugger.started?,
40
- 'Debugger should now be started.')
41
- assert_equal(false, Debugger.debug,
42
- 'Debug variable should not be set.')
43
- assert_equal(false, Debugger.post_mortem?,
44
- 'Post mortem debugging should not be set.')
45
- a = Debugger.contexts
46
- assert_equal(1, a.size,
47
- 'There should only be one context.')
48
- assert_equal(Array, a.class,
49
- 'Context should be an array.')
50
- Debugger.stop
51
- assert_equal(false, Debugger.started?,
52
- 'debugger should no longer be started.')
53
- end
54
-
55
- # Test breakpoint handling
56
- def test_breakpoints
57
- Debugger.start_
58
- assert_equal(0, Debugger.breakpoints.size,
59
- 'There should not be any breakpoints set.')
60
- brk = Debugger.add_breakpoint(__FILE__, 1)
61
- assert_equal(Debugger::Breakpoint, brk.class,
62
- 'Breakpoint should have been set and returned.')
63
- assert_equal(1, Debugger.breakpoints.size,
64
- 'There should now be one breakpoint set.')
65
- Debugger.remove_breakpoint(0)
66
- assert_equal(1, Debugger.breakpoints.size,
67
- 'There should still be one breakpoint set.')
68
- Debugger.remove_breakpoint(1)
69
- assert_equal(0, Debugger.breakpoints.size,
70
- 'There should no longer be any breakpoints set.')
71
- Debugger.stop
72
- end
73
- end
74
-
1
+ #!/usr/bin/env ruby
2
+ require 'test/unit'
3
+
4
+ # Some tests of Debugger module in C extension ruby_debug
5
+ class TestRubyDebug < Test::Unit::TestCase
6
+ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
7
+ require 'ruby_debug'
8
+ $:.shift
9
+
10
+ # test current_context
11
+ def test_current_context
12
+ assert_equal(false, Debugger.started?,
13
+ 'debugger should not initially be started.')
14
+ Debugger.start_
15
+ assert(Debugger.started?,
16
+ 'debugger should now be started.')
17
+ assert_equal(__LINE__, Debugger.current_context.frame_line)
18
+ assert_equal(nil, Debugger.current_context.frame_args_info,
19
+ 'no frame args info.')
20
+ assert_equal(Debugger.current_context.frame_file,
21
+ Debugger.current_context.frame_file(0))
22
+ assert_equal(File.basename(__FILE__),
23
+ File.basename(Debugger.current_context.frame_file))
24
+ assert_raises(ArgumentError) {Debugger.current_context.frame_file(1, 2)}
25
+ assert_raises(ArgumentError) {Debugger.current_context.frame_file(10)}
26
+ assert_equal(1, Debugger.current_context.stack_size)
27
+ assert_equal(TestRubyDebug, Debugger.current_context.frame_class)
28
+ assert_equal(false, Debugger.current_context.dead?, 'Not dead yet!')
29
+ Debugger.stop
30
+ assert_equal(false, Debugger.started?,
31
+ 'Debugger should no longer be started.')
32
+ end
33
+
34
+ # Test initial variables and setting/getting state.
35
+ def test_debugger_base
36
+ assert_equal(false, Debugger.started?,
37
+ 'Debugger should not initially be started.')
38
+ Debugger.start_
39
+ assert(Debugger.started?,
40
+ 'Debugger should now be started.')
41
+ assert_equal(false, Debugger.debug,
42
+ 'Debug variable should not be set.')
43
+ assert_equal(false, Debugger.post_mortem?,
44
+ 'Post mortem debugging should not be set.')
45
+ a = Debugger.contexts
46
+ assert_equal(1, a.size,
47
+ 'There should only be one context.')
48
+ assert_equal(Array, a.class,
49
+ 'Context should be an array.')
50
+ Debugger.stop
51
+ assert_equal(false, Debugger.started?,
52
+ 'debugger should no longer be started.')
53
+ end
54
+
55
+ # Test breakpoint handling
56
+ def test_breakpoints
57
+ Debugger.start_
58
+ assert_equal(0, Debugger.breakpoints.size,
59
+ 'There should not be any breakpoints set.')
60
+ brk = Debugger.add_breakpoint(__FILE__, 1)
61
+ assert_equal(Debugger::Breakpoint, brk.class,
62
+ 'Breakpoint should have been set and returned.')
63
+ assert_equal(1, Debugger.breakpoints.size,
64
+ 'There should now be one breakpoint set.')
65
+ Debugger.remove_breakpoint(0)
66
+ assert_equal(1, Debugger.breakpoints.size,
67
+ 'There should still be one breakpoint set.')
68
+ Debugger.remove_breakpoint(1)
69
+ assert_equal(0, Debugger.breakpoints.size,
70
+ 'There should no longer be any breakpoints set.')
71
+ Debugger.stop
72
+ end
73
+ end
74
+
data/test/base/binding.rb CHANGED
@@ -1,31 +1,31 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
-
5
- # Test binding_n command
6
- class TestBinding < Test::Unit::TestCase
7
-
8
- SRC_DIR = File.expand_path(File.dirname(__FILE__)) unless
9
- defined?(SRC_DIR)
10
- %w(ext lib).each do |dir|
11
- $:.unshift File.join(SRC_DIR, '..', '..', dir)
12
- end
13
- require File.join(SRC_DIR, '..', '..', 'lib', 'ruby-debug-base')
14
- $:.shift; $:.shift
15
-
16
- def test_basic
17
- def inside_fn
18
- s = 'some other string'
19
- b2 = Kernel::binding_n(1)
20
- y2 = eval('s', b2)
21
- assert_equal('this is a test', y2)
22
- end
23
- s = 'this is a test'
24
- Debugger.start
25
- b = Kernel::binding_n(0)
26
- y = eval('s', b)
27
- assert_equal(y, s)
28
- inside_fn
29
- Debugger.stop
30
- end
31
- end
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+
5
+ # Test binding_n command
6
+ class TestBinding < Test::Unit::TestCase
7
+
8
+ SRC_DIR = File.expand_path(File.dirname(__FILE__)) unless
9
+ defined?(SRC_DIR)
10
+ %w(ext lib).each do |dir|
11
+ $:.unshift File.join(SRC_DIR, '..', '..', dir)
12
+ end
13
+ require File.join(SRC_DIR, '..', '..', 'lib', 'ruby-debug-base')
14
+ $:.shift; $:.shift
15
+
16
+ def test_basic
17
+ def inside_fn
18
+ s = 'some other string'
19
+ b2 = Kernel::binding_n(1)
20
+ y2 = eval('s', b2)
21
+ assert_equal('this is a test', y2)
22
+ end
23
+ s = 'this is a test'
24
+ Debugger.start
25
+ b = Kernel::binding_n(0)
26
+ y = eval('s', b)
27
+ assert_equal(y, s)
28
+ inside_fn
29
+ Debugger.stop
30
+ end
31
+ end
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env ruby
2
- require 'test/unit'
3
-
4
- # Test catchpoint in C ruby_debug extension.
5
-
6
- class TestRubyDebugCatchpoint < Test::Unit::TestCase
7
-
8
- $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
9
- require 'ruby_debug'
10
- $:.shift
11
-
12
- # test current_context
13
- def test_catchpoints
14
- assert_raise(RuntimeError) {Debugger.catchpoints}
15
- Debugger.start_
16
- assert_equal({}, Debugger.catchpoints)
17
- Debugger.add_catchpoint('ZeroDivisionError')
18
- assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
19
- Debugger.add_catchpoint('RuntimeError')
20
- assert_equal(['RuntimeError', 'ZeroDivisionError'],
21
- Debugger.catchpoints.keys.sort)
22
- Debugger.stop
23
- end
24
-
25
- end
26
-
1
+ #!/usr/bin/env ruby
2
+ require 'test/unit'
3
+
4
+ # Test catchpoint in C ruby_debug extension.
5
+
6
+ class TestRubyDebugCatchpoint < Test::Unit::TestCase
7
+
8
+ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
9
+ require 'ruby_debug'
10
+ $:.shift
11
+
12
+ # test current_context
13
+ def test_catchpoints
14
+ assert_raise(RuntimeError) {Debugger.catchpoints}
15
+ Debugger.start_
16
+ assert_equal({}, Debugger.catchpoints)
17
+ Debugger.add_catchpoint('ZeroDivisionError')
18
+ assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
19
+ Debugger.add_catchpoint('RuntimeError')
20
+ assert_equal(['RuntimeError', 'ZeroDivisionError'],
21
+ Debugger.catchpoints.keys.sort)
22
+ Debugger.stop
23
+ end
24
+
25
+ end
26
+
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-base19x
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 0
7
7
  - 11
8
8
  - 25
9
- - jb3
10
- version: 0.11.25.jb3
9
+ version: 0.11.25
11
10
  platform: ruby
12
11
  authors:
13
12
  - Kent Sibilev, Mark Moseley
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-01-31 00:00:00 +03:00
17
+ date: 2011-02-14 00:00:00 +03:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -87,8 +86,8 @@ files:
87
86
  - ext/ruby_debug/extconf.rb
88
87
  - ext/ruby_debug/ruby_debug.c
89
88
  - ext/ruby_debug/ruby_debug.h
90
- - lib/ChangeLog
91
89
  - lib/ruby-debug-base.rb
90
+ - lib/ChangeLog
92
91
  - test/base/base.rb
93
92
  - test/base/binding.rb
94
93
  - test/base/catchpoint.rb
@@ -114,13 +113,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
113
  required_rubygems_version: !ruby/object:Gem::Requirement
115
114
  none: false
116
115
  requirements:
117
- - - ">"
116
+ - - ">="
118
117
  - !ruby/object:Gem::Version
119
118
  segments:
120
- - 1
121
- - 3
122
- - 1
123
- version: 1.3.1
119
+ - 0
120
+ version: "0"
124
121
  requirements: []
125
122
 
126
123
  rubyforge_project: ruby-debug19