debugger 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +14 -0
- data/.travis.yml +0 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile +3 -0
- data/README.md +2 -0
- data/Rakefile +3 -55
- data/debugger.gemspec +2 -0
- data/lib/debugger/version.rb +1 -1
- data/lib/ruby-debug-base.rb +3 -1
- data/lib/ruby-debug/commands/irb.rb +1 -1
- data/lib/ruby-debug/commands/jump.rb +1 -1
- data/lib/ruby-debug/commands/method.rb +1 -1
- data/lib/ruby-debug/commands/show.rb +1 -1
- data/lib/ruby-debug/commands/trace.rb +2 -2
- data/lib/ruby-debug/commands/variables.rb +3 -3
- data/test/breakpoints_test.rb +365 -0
- data/test/conditions_test.rb +76 -0
- data/test/continue_test.rb +28 -0
- data/test/display_test.rb +141 -0
- data/test/edit_test.rb +55 -0
- data/test/eval_test.rb +92 -0
- data/test/examples/breakpoint1.rb +15 -0
- data/test/examples/breakpoint2.rb +7 -0
- data/test/examples/conditions.rb +4 -0
- data/test/examples/continue.rb +4 -0
- data/test/examples/display.rb +5 -0
- data/test/examples/edit.rb +3 -0
- data/test/examples/edit2.rb +3 -0
- data/test/examples/eval.rb +4 -0
- data/test/examples/finish.rb +20 -0
- data/test/examples/frame.rb +31 -0
- data/test/examples/help.rb +2 -0
- data/test/examples/info.rb +48 -0
- data/test/examples/info2.rb +3 -0
- data/test/examples/irb.rb +6 -0
- data/test/examples/jump.rb +14 -0
- data/test/examples/kill.rb +2 -0
- data/test/examples/list.rb +12 -0
- data/test/examples/method.rb +15 -0
- data/test/examples/post_mortem.rb +19 -0
- data/test/examples/quit.rb +2 -0
- data/test/examples/reload.rb +6 -0
- data/test/examples/restart.rb +6 -0
- data/test/examples/save.rb +3 -0
- data/test/examples/set.rb +3 -0
- data/test/examples/set_annotate.rb +12 -0
- data/test/examples/settings.rb +1 -0
- data/test/examples/show.rb +2 -0
- data/test/examples/source.rb +3 -0
- data/test/examples/stepping.rb +21 -0
- data/test/examples/thread.rb +32 -0
- data/test/examples/tmate.rb +10 -0
- data/test/examples/trace.rb +7 -0
- data/test/examples/trace_threads.rb +20 -0
- data/test/examples/variables.rb +26 -0
- data/test/finish_test.rb +48 -0
- data/test/frame_test.rb +140 -0
- data/test/help_test.rb +50 -0
- data/test/info_test.rb +325 -0
- data/test/irb_test.rb +81 -0
- data/test/jump_test.rb +70 -0
- data/test/kill_test.rb +47 -0
- data/test/list_test.rb +145 -0
- data/test/method_test.rb +70 -0
- data/test/post_mortem_test.rb +25 -0
- data/test/quit_test.rb +55 -0
- data/test/reload_test.rb +43 -0
- data/test/restart_test.rb +143 -0
- data/test/save_test.rb +92 -0
- data/test/set_test.rb +163 -0
- data/test/show_test.rb +292 -0
- data/test/source_test.rb +44 -0
- data/test/stepping_test.rb +118 -0
- data/test/support/breakpoint.rb +12 -0
- data/test/support/context.rb +14 -0
- data/test/support/matchers.rb +67 -0
- data/test/support/mocha_extensions.rb +71 -0
- data/test/support/processor.rb +7 -0
- data/test/support/test_dsl.rb +205 -0
- data/test/support/test_interface.rb +66 -0
- data/test/test_helper.rb +8 -0
- data/test/thread_test.rb +122 -0
- data/test/tmate_test.rb +43 -0
- data/test/trace_test.rb +154 -0
- data/test/variables_test.rb +114 -0
- metadata +107 -158
- data/test/base/base.rb +0 -71
- data/test/base/binding.rb +0 -24
- data/test/base/catchpoint.rb +0 -22
- data/test/base/load.rb +0 -36
- data/test/bp_loop_issue.rb +0 -3
- data/test/classes.rb +0 -11
- data/test/config.yaml +0 -8
- data/test/data/annotate.cmd +0 -29
- data/test/data/annotate.right +0 -139
- data/test/data/break_bad.cmd +0 -18
- data/test/data/break_bad.right +0 -28
- data/test/data/break_loop_bug.cmd +0 -5
- data/test/data/break_loop_bug.right +0 -15
- data/test/data/breakpoints.cmd +0 -38
- data/test/data/breakpoints.right +0 -98
- data/test/data/catch.cmd +0 -20
- data/test/data/catch.right +0 -49
- data/test/data/catch2.cmd +0 -19
- data/test/data/catch2.right +0 -65
- data/test/data/catch3.cmd +0 -11
- data/test/data/catch3.right +0 -37
- data/test/data/condition.cmd +0 -28
- data/test/data/condition.right +0 -65
- data/test/data/ctrl.cmd +0 -23
- data/test/data/ctrl.right +0 -70
- data/test/data/display.cmd +0 -24
- data/test/data/display.right +0 -44
- data/test/data/dollar-0.right +0 -2
- data/test/data/dollar-0a.right +0 -2
- data/test/data/dollar-0b.right +0 -2
- data/test/data/edit.cmd +0 -12
- data/test/data/edit.right +0 -19
- data/test/data/emacs_basic.cmd +0 -43
- data/test/data/emacs_basic.right +0 -106
- data/test/data/enable.cmd +0 -20
- data/test/data/enable.right +0 -36
- data/test/data/finish.cmd +0 -16
- data/test/data/finish.right +0 -31
- data/test/data/frame.cmd +0 -26
- data/test/data/frame.right +0 -55
- data/test/data/help.cmd +0 -20
- data/test/data/help.right +0 -21
- data/test/data/history.right +0 -7
- data/test/data/info-thread.cmd +0 -13
- data/test/data/info-thread.right +0 -37
- data/test/data/info-var-bug2.cmd +0 -5
- data/test/data/info-var-bug2.right +0 -10
- data/test/data/info-var.cmd +0 -23
- data/test/data/info-var.right +0 -52
- data/test/data/info.cmd +0 -21
- data/test/data/info.right +0 -65
- data/test/data/jump.cmd +0 -16
- data/test/data/jump.right +0 -56
- data/test/data/jump2.cmd +0 -16
- data/test/data/jump2.right +0 -44
- data/test/data/linetrace.cmd +0 -6
- data/test/data/linetrace.right +0 -23
- data/test/data/list.cmd +0 -19
- data/test/data/list.right +0 -127
- data/test/data/method.cmd +0 -10
- data/test/data/method.right +0 -21
- data/test/data/methodsig.cmd +0 -10
- data/test/data/methodsig.right +0 -20
- data/test/data/next.cmd +0 -22
- data/test/data/next.right +0 -61
- data/test/data/noquit.right +0 -1
- data/test/data/output.cmd +0 -6
- data/test/data/output.right +0 -31
- data/test/data/pm-bug.cmd +0 -7
- data/test/data/pm-bug.right +0 -12
- data/test/data/post-mortem-next.cmd +0 -8
- data/test/data/post-mortem-next.right +0 -14
- data/test/data/post-mortem-osx.right +0 -31
- data/test/data/post-mortem.cmd +0 -13
- data/test/data/post-mortem.right +0 -32
- data/test/data/quit.cmd +0 -6
- data/test/data/quit.right +0 -0
- data/test/data/raise.cmd +0 -11
- data/test/data/raise.right +0 -23
- data/test/data/save.cmd +0 -34
- data/test/data/save.right +0 -59
- data/test/data/scope-var.cmd +0 -42
- data/test/data/scope-var.right +0 -587
- data/test/data/setshow.cmd +0 -56
- data/test/data/setshow.right +0 -98
- data/test/data/source.cmd +0 -5
- data/test/data/source.right +0 -15
- data/test/data/stepping.cmd +0 -21
- data/test/data/stepping.right +0 -50
- data/test/data/test-init-cygwin.right +0 -7
- data/test/data/test-init-osx.right +0 -4
- data/test/data/test-init.right +0 -5
- data/test/data/trace.right +0 -14
- data/test/dollar-0.rb +0 -5
- data/test/gcd-dbg-nox.rb +0 -30
- data/test/gcd-dbg.rb +0 -29
- data/test/gcd.rb +0 -18
- data/test/helper.rb +0 -142
- data/test/info-var-bug.rb +0 -47
- data/test/info-var-bug2.rb +0 -2
- data/test/jump.rb +0 -14
- data/test/jump2.rb +0 -27
- data/test/lib/commands/catchpoint_test.rb +0 -28
- data/test/lib/commands/unit/regexp.rb +0 -38
- data/test/next.rb +0 -18
- data/test/null.rb +0 -1
- data/test/output.rb +0 -2
- data/test/pm-base.rb +0 -17
- data/test/pm-bug.rb +0 -3
- data/test/pm-catch.rb +0 -12
- data/test/pm-catch2.rb +0 -27
- data/test/pm-catch3.rb +0 -47
- data/test/pm.rb +0 -11
- data/test/raise.rb +0 -3
- data/test/rdebug-save.1 +0 -7
- data/test/runall +0 -12
- data/test/scope-var.rb +0 -29
- data/test/tdebug.rb +0 -246
- data/test/test-annotate.rb +0 -24
- data/test/test-break-bad.rb +0 -36
- data/test/test-breakpoints.rb +0 -24
- data/test/test-catch.rb +0 -24
- data/test/test-catch2.rb +0 -24
- data/test/test-catch3.rb +0 -24
- data/test/test-condition.rb +0 -24
- data/test/test-ctrl.rb +0 -51
- data/test/test-display.rb +0 -25
- data/test/test-dollar-0.rb +0 -39
- data/test/test-edit.rb +0 -25
- data/test/test-emacs-basic.rb +0 -25
- data/test/test-enable.rb +0 -24
- data/test/test-finish.rb +0 -33
- data/test/test-frame.rb +0 -33
- data/test/test-help.rb +0 -54
- data/test/test-hist.rb +0 -65
- data/test/test-info-thread.rb +0 -31
- data/test/test-info-var.rb +0 -46
- data/test/test-info.rb +0 -25
- data/test/test-init.rb +0 -43
- data/test/test-jump.rb +0 -34
- data/test/test-list.rb +0 -24
- data/test/test-method.rb +0 -33
- data/test/test-next.rb +0 -24
- data/test/test-output.rb +0 -25
- data/test/test-quit.rb +0 -29
- data/test/test-raise.rb +0 -24
- data/test/test-remote.rb +0 -14
- data/test/test-save.rb +0 -30
- data/test/test-scope-var.rb +0 -24
- data/test/test-setshow.rb +0 -24
- data/test/test-source.rb +0 -24
- data/test/test-stepping.rb +0 -25
- data/test/test-trace.rb +0 -46
- data/test/thread1.rb +0 -25
- data/test/trunc-call.rb +0 -30
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debugger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-01-
|
14
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: columnize
|
@@ -93,6 +93,38 @@ dependencies:
|
|
93
93
|
- - ~>
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: 0.8.0
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: minitest
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.12.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 2.12.1
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: mocha
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ~>
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 0.13.0
|
120
|
+
type: :development
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ~>
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 0.13.0
|
96
128
|
description: ! 'debugger is a fast implementation of the standard Ruby debugger debug.rb.
|
97
129
|
|
98
130
|
It is implemented by utilizing a new Ruby C API hook. The core component
|
@@ -110,9 +142,11 @@ extensions:
|
|
110
142
|
extra_rdoc_files:
|
111
143
|
- README.md
|
112
144
|
files:
|
145
|
+
- .gitignore
|
113
146
|
- .travis.yml
|
114
147
|
- AUTHORS
|
115
148
|
- CHANGELOG.md
|
149
|
+
- Gemfile
|
116
150
|
- LICENSE
|
117
151
|
- OLDER_CHANGELOG
|
118
152
|
- OLD_CHANGELOG
|
@@ -220,161 +254,76 @@ files:
|
|
220
254
|
- old_scripts/runner.sh
|
221
255
|
- old_scripts/svn2cl_usermap
|
222
256
|
- test/.cvsignore
|
223
|
-
- test/
|
224
|
-
- test/
|
225
|
-
- test/
|
226
|
-
- test/
|
227
|
-
- test/
|
228
|
-
- test/
|
229
|
-
- test/
|
230
|
-
- test/
|
231
|
-
- test/
|
232
|
-
- test/
|
233
|
-
- test/
|
234
|
-
- test/
|
235
|
-
- test/
|
236
|
-
- test/
|
237
|
-
- test/
|
238
|
-
- test/
|
239
|
-
- test/
|
240
|
-
- test/
|
241
|
-
- test/
|
242
|
-
- test/
|
243
|
-
- test/
|
244
|
-
- test/
|
245
|
-
- test/
|
246
|
-
- test/
|
247
|
-
- test/
|
248
|
-
- test/
|
249
|
-
- test/
|
250
|
-
- test/
|
251
|
-
- test/
|
252
|
-
- test/
|
253
|
-
- test/
|
254
|
-
- test/
|
255
|
-
- test/
|
256
|
-
- test/
|
257
|
-
- test/
|
258
|
-
- test/
|
259
|
-
- test/
|
260
|
-
- test/
|
261
|
-
- test/
|
262
|
-
- test/
|
263
|
-
- test/
|
264
|
-
- test/
|
265
|
-
- test/
|
266
|
-
- test/
|
267
|
-
- test/
|
268
|
-
- test/
|
269
|
-
- test/
|
270
|
-
- test/
|
271
|
-
- test/
|
272
|
-
- test/
|
273
|
-
- test/
|
274
|
-
- test/
|
275
|
-
- test/
|
276
|
-
- test/
|
277
|
-
- test/
|
278
|
-
- test/
|
279
|
-
- test/
|
280
|
-
- test/
|
281
|
-
- test/
|
282
|
-
- test/
|
283
|
-
- test/
|
284
|
-
- test/
|
285
|
-
- test/
|
286
|
-
- test/
|
287
|
-
- test/
|
288
|
-
- test/
|
289
|
-
- test/
|
290
|
-
- test/
|
291
|
-
- test/
|
292
|
-
- test/
|
293
|
-
- test/data/post-mortem-next.cmd
|
294
|
-
- test/data/post-mortem-next.right
|
295
|
-
- test/data/post-mortem-osx.right
|
296
|
-
- test/data/post-mortem.cmd
|
297
|
-
- test/data/post-mortem.right
|
298
|
-
- test/data/quit.cmd
|
299
|
-
- test/data/quit.right
|
300
|
-
- test/data/raise.cmd
|
301
|
-
- test/data/raise.right
|
302
|
-
- test/data/save.cmd
|
303
|
-
- test/data/save.right
|
304
|
-
- test/data/scope-var.cmd
|
305
|
-
- test/data/scope-var.right
|
306
|
-
- test/data/setshow.cmd
|
307
|
-
- test/data/setshow.right
|
308
|
-
- test/data/source.cmd
|
309
|
-
- test/data/source.right
|
310
|
-
- test/data/stepping.cmd
|
311
|
-
- test/data/stepping.right
|
312
|
-
- test/data/test-init-cygwin.right
|
313
|
-
- test/data/test-init-osx.right
|
314
|
-
- test/data/test-init.right
|
315
|
-
- test/data/trace.right
|
316
|
-
- test/dollar-0.rb
|
317
|
-
- test/gcd-dbg-nox.rb
|
318
|
-
- test/gcd-dbg.rb
|
319
|
-
- test/gcd.rb
|
320
|
-
- test/helper.rb
|
321
|
-
- test/info-var-bug.rb
|
322
|
-
- test/info-var-bug2.rb
|
323
|
-
- test/jump.rb
|
324
|
-
- test/jump2.rb
|
325
|
-
- test/lib/commands/catchpoint_test.rb
|
326
|
-
- test/lib/commands/unit/regexp.rb
|
327
|
-
- test/next.rb
|
328
|
-
- test/null.rb
|
329
|
-
- test/output.rb
|
330
|
-
- test/pm-base.rb
|
331
|
-
- test/pm-bug.rb
|
332
|
-
- test/pm-catch.rb
|
333
|
-
- test/pm-catch2.rb
|
334
|
-
- test/pm-catch3.rb
|
335
|
-
- test/pm.rb
|
336
|
-
- test/raise.rb
|
337
|
-
- test/rdebug-save.1
|
338
|
-
- test/runall
|
339
|
-
- test/scope-var.rb
|
340
|
-
- test/tdebug.rb
|
341
|
-
- test/test-annotate.rb
|
342
|
-
- test/test-break-bad.rb
|
343
|
-
- test/test-breakpoints.rb
|
344
|
-
- test/test-catch.rb
|
345
|
-
- test/test-catch2.rb
|
346
|
-
- test/test-catch3.rb
|
347
|
-
- test/test-condition.rb
|
348
|
-
- test/test-ctrl.rb
|
349
|
-
- test/test-display.rb
|
350
|
-
- test/test-dollar-0.rb
|
351
|
-
- test/test-edit.rb
|
352
|
-
- test/test-emacs-basic.rb
|
353
|
-
- test/test-enable.rb
|
354
|
-
- test/test-finish.rb
|
355
|
-
- test/test-frame.rb
|
356
|
-
- test/test-help.rb
|
357
|
-
- test/test-hist.rb
|
358
|
-
- test/test-info-thread.rb
|
359
|
-
- test/test-info-var.rb
|
360
|
-
- test/test-info.rb
|
361
|
-
- test/test-init.rb
|
362
|
-
- test/test-jump.rb
|
363
|
-
- test/test-list.rb
|
364
|
-
- test/test-method.rb
|
365
|
-
- test/test-next.rb
|
366
|
-
- test/test-output.rb
|
367
|
-
- test/test-quit.rb
|
368
|
-
- test/test-raise.rb
|
369
|
-
- test/test-remote.rb
|
370
|
-
- test/test-save.rb
|
371
|
-
- test/test-scope-var.rb
|
372
|
-
- test/test-setshow.rb
|
373
|
-
- test/test-source.rb
|
374
|
-
- test/test-stepping.rb
|
375
|
-
- test/test-trace.rb
|
376
|
-
- test/thread1.rb
|
377
|
-
- test/trunc-call.rb
|
257
|
+
- test/breakpoints_test.rb
|
258
|
+
- test/conditions_test.rb
|
259
|
+
- test/continue_test.rb
|
260
|
+
- test/display_test.rb
|
261
|
+
- test/edit_test.rb
|
262
|
+
- test/eval_test.rb
|
263
|
+
- test/examples/breakpoint1.rb
|
264
|
+
- test/examples/breakpoint2.rb
|
265
|
+
- test/examples/conditions.rb
|
266
|
+
- test/examples/continue.rb
|
267
|
+
- test/examples/display.rb
|
268
|
+
- test/examples/edit.rb
|
269
|
+
- test/examples/edit2.rb
|
270
|
+
- test/examples/eval.rb
|
271
|
+
- test/examples/finish.rb
|
272
|
+
- test/examples/frame.rb
|
273
|
+
- test/examples/help.rb
|
274
|
+
- test/examples/info.rb
|
275
|
+
- test/examples/info2.rb
|
276
|
+
- test/examples/irb.rb
|
277
|
+
- test/examples/jump.rb
|
278
|
+
- test/examples/kill.rb
|
279
|
+
- test/examples/list.rb
|
280
|
+
- test/examples/method.rb
|
281
|
+
- test/examples/post_mortem.rb
|
282
|
+
- test/examples/quit.rb
|
283
|
+
- test/examples/reload.rb
|
284
|
+
- test/examples/restart.rb
|
285
|
+
- test/examples/save.rb
|
286
|
+
- test/examples/set.rb
|
287
|
+
- test/examples/set_annotate.rb
|
288
|
+
- test/examples/settings.rb
|
289
|
+
- test/examples/show.rb
|
290
|
+
- test/examples/source.rb
|
291
|
+
- test/examples/stepping.rb
|
292
|
+
- test/examples/thread.rb
|
293
|
+
- test/examples/tmate.rb
|
294
|
+
- test/examples/trace.rb
|
295
|
+
- test/examples/trace_threads.rb
|
296
|
+
- test/examples/variables.rb
|
297
|
+
- test/finish_test.rb
|
298
|
+
- test/frame_test.rb
|
299
|
+
- test/help_test.rb
|
300
|
+
- test/info_test.rb
|
301
|
+
- test/irb_test.rb
|
302
|
+
- test/jump_test.rb
|
303
|
+
- test/kill_test.rb
|
304
|
+
- test/list_test.rb
|
305
|
+
- test/method_test.rb
|
306
|
+
- test/post_mortem_test.rb
|
307
|
+
- test/quit_test.rb
|
308
|
+
- test/reload_test.rb
|
309
|
+
- test/restart_test.rb
|
310
|
+
- test/save_test.rb
|
311
|
+
- test/set_test.rb
|
312
|
+
- test/show_test.rb
|
313
|
+
- test/source_test.rb
|
314
|
+
- test/stepping_test.rb
|
315
|
+
- test/support/breakpoint.rb
|
316
|
+
- test/support/context.rb
|
317
|
+
- test/support/matchers.rb
|
318
|
+
- test/support/mocha_extensions.rb
|
319
|
+
- test/support/processor.rb
|
320
|
+
- test/support/test_dsl.rb
|
321
|
+
- test/support/test_interface.rb
|
322
|
+
- test/test_helper.rb
|
323
|
+
- test/thread_test.rb
|
324
|
+
- test/tmate_test.rb
|
325
|
+
- test/trace_test.rb
|
326
|
+
- test/variables_test.rb
|
378
327
|
homepage: http://github.com/cldwalker/debugger
|
379
328
|
licenses: []
|
380
329
|
post_install_message:
|
@@ -395,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
395
344
|
version: 1.3.6
|
396
345
|
requirements: []
|
397
346
|
rubyforge_project:
|
398
|
-
rubygems_version: 1.8.
|
347
|
+
rubygems_version: 1.8.24
|
399
348
|
signing_key:
|
400
349
|
specification_version: 3
|
401
350
|
summary: Fast Ruby debugger - base + cli
|
data/test/base/base.rb
DELETED
@@ -1,71 +0,0 @@
|
|
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
|
-
require 'ruby_debug'
|
7
|
-
|
8
|
-
# test current_context
|
9
|
-
def test_current_context
|
10
|
-
assert_equal(false, Debugger.started?,
|
11
|
-
'debugger should not initially be started.')
|
12
|
-
Debugger.start_
|
13
|
-
assert(Debugger.started?,
|
14
|
-
'debugger should now be started.')
|
15
|
-
assert_equal(__LINE__, Debugger.current_context.frame_line)
|
16
|
-
assert_equal(nil, Debugger.current_context.frame_args_info,
|
17
|
-
'no frame args info.')
|
18
|
-
assert_equal(Debugger.current_context.frame_file,
|
19
|
-
Debugger.current_context.frame_file(0))
|
20
|
-
assert_equal(File.basename(__FILE__),
|
21
|
-
File.basename(Debugger.current_context.frame_file))
|
22
|
-
assert_raises(ArgumentError) {Debugger.current_context.frame_file(1, 2)}
|
23
|
-
assert_raises(ArgumentError) {Debugger.current_context.frame_file(10)}
|
24
|
-
assert_equal(1, Debugger.current_context.stack_size)
|
25
|
-
assert_equal(TestRubyDebug, Debugger.current_context.frame_class)
|
26
|
-
assert_equal(false, Debugger.current_context.dead?, 'Not dead yet!')
|
27
|
-
Debugger.stop
|
28
|
-
assert_equal(false, Debugger.started?,
|
29
|
-
'Debugger should no longer be started.')
|
30
|
-
end
|
31
|
-
|
32
|
-
# Test initial variables and setting/getting state.
|
33
|
-
def test_debugger_base
|
34
|
-
assert_equal(false, Debugger.started?,
|
35
|
-
'Debugger should not initially be started.')
|
36
|
-
Debugger.start_
|
37
|
-
assert(Debugger.started?,
|
38
|
-
'Debugger should now be started.')
|
39
|
-
assert_equal(false, Debugger.debug,
|
40
|
-
'Debug variable should not be set.')
|
41
|
-
assert_equal(false, Debugger.post_mortem?,
|
42
|
-
'Post mortem debugging should not be set.')
|
43
|
-
a = Debugger.contexts
|
44
|
-
assert_equal(1, a.size,
|
45
|
-
'There should only be one context.')
|
46
|
-
assert_equal(Array, a.class,
|
47
|
-
'Context should be an array.')
|
48
|
-
Debugger.stop
|
49
|
-
assert_equal(false, Debugger.started?,
|
50
|
-
'debugger should no longer be started.')
|
51
|
-
end
|
52
|
-
|
53
|
-
# Test breakpoint handling
|
54
|
-
def test_breakpoints
|
55
|
-
Debugger.start_
|
56
|
-
assert_equal(0, Debugger.breakpoints.size,
|
57
|
-
'There should not be any breakpoints set.')
|
58
|
-
brk = Debugger.add_breakpoint(__FILE__, 1)
|
59
|
-
assert_equal(Debugger::Breakpoint, brk.class,
|
60
|
-
'Breakpoint should have been set and returned.')
|
61
|
-
assert_equal(1, Debugger.breakpoints.size,
|
62
|
-
'There should now be one breakpoint set.')
|
63
|
-
Debugger.remove_breakpoint(0)
|
64
|
-
assert_equal(1, Debugger.breakpoints.size,
|
65
|
-
'There should still be one breakpoint set.')
|
66
|
-
Debugger.remove_breakpoint(1)
|
67
|
-
assert_equal(0, Debugger.breakpoints.size,
|
68
|
-
'There should no longer be any breakpoints set.')
|
69
|
-
Debugger.stop
|
70
|
-
end
|
71
|
-
end
|
data/test/base/binding.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
require 'ruby-debug-base'
|
5
|
-
|
6
|
-
# Test binding_n command
|
7
|
-
class TestBinding < Test::Unit::TestCase
|
8
|
-
|
9
|
-
def test_basic
|
10
|
-
def inside_fn
|
11
|
-
s = 'some other string'
|
12
|
-
b2 = Kernel::binding_n(1)
|
13
|
-
y2 = eval('s', b2)
|
14
|
-
assert_equal('this is a test', y2)
|
15
|
-
end
|
16
|
-
s = 'this is a test'
|
17
|
-
Debugger.start
|
18
|
-
b = Kernel::binding_n(0)
|
19
|
-
y = eval('s', b)
|
20
|
-
assert_equal(y, s)
|
21
|
-
inside_fn
|
22
|
-
Debugger.stop
|
23
|
-
end
|
24
|
-
end
|
data/test/base/catchpoint.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'test/unit'
|
3
|
-
require 'ruby_debug'
|
4
|
-
|
5
|
-
# Test catchpoint in C ruby_debug extension.
|
6
|
-
|
7
|
-
class TestRubyDebugCatchpoint < Test::Unit::TestCase
|
8
|
-
|
9
|
-
# test current_context
|
10
|
-
def test_catchpoints
|
11
|
-
assert_raise(RuntimeError) {Debugger.catchpoints}
|
12
|
-
Debugger.start_
|
13
|
-
assert_equal({}, Debugger.catchpoints)
|
14
|
-
Debugger.add_catchpoint('ZeroDivisionError')
|
15
|
-
assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
|
16
|
-
Debugger.add_catchpoint('RuntimeError')
|
17
|
-
assert_equal(['RuntimeError', 'ZeroDivisionError'],
|
18
|
-
Debugger.catchpoints.keys.sort)
|
19
|
-
Debugger.stop
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
data/test/base/load.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'test/unit'
|
3
|
-
require 'ruby_debug'
|
4
|
-
|
5
|
-
# Test of Debugger.debug_load in C extension ruby_debug.so
|
6
|
-
class TestDebugLoad < Test::Unit::TestCase
|
7
|
-
|
8
|
-
class << self
|
9
|
-
def at_line(file, line)
|
10
|
-
@@at_line = [File.basename(file), line]
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
Debugger::PROG_SCRIPT = File.join(@@src_dir, '..', 'gcd.rb')
|
15
|
-
|
16
|
-
class Debugger::Context
|
17
|
-
def at_line(file, line)
|
18
|
-
TestDebugLoad::at_line(file, line)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def test_debug_load
|
23
|
-
# Without stopping
|
24
|
-
bt = Debugger.debug_load(Debugger::PROG_SCRIPT, false)
|
25
|
-
assert_equal(nil, bt)
|
26
|
-
# With stopping
|
27
|
-
bt = Debugger.debug_load(Debugger::PROG_SCRIPT, true)
|
28
|
-
assert_equal(nil, bt)
|
29
|
-
assert_equal(['gcd.rb', 4], @@at_line)
|
30
|
-
|
31
|
-
# Test that we get a proper backtrace on a script that raises 'abc'
|
32
|
-
prog_script = File.join(@@src_dir, '..', 'raise.rb')
|
33
|
-
bt = Debugger.debug_load(prog_script, false)
|
34
|
-
assert_equal(bt.to_s, 'abc')
|
35
|
-
end
|
36
|
-
end
|