byebug 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/GUIDE.md +210 -4
  4. data/README.md +93 -64
  5. data/bin/byebug +10 -4
  6. data/byebug.gemspec +1 -1
  7. data/ext/byebug/breakpoint.c +22 -20
  8. data/lib/byebug/command.rb +5 -3
  9. data/lib/byebug/commands/frame.rb +2 -1
  10. data/lib/byebug/commands/kill.rb +0 -1
  11. data/lib/byebug/commands/set.rb +5 -6
  12. data/lib/byebug/commands/show.rb +11 -11
  13. data/lib/byebug/version.rb +1 -1
  14. data/logo.png +0 -0
  15. data/old_doc/byebug.texi +2 -2
  16. data/old_doc/{test-tri2.rb → test-triangle.rb} +4 -5
  17. data/old_doc/tri3.rb +3 -5
  18. data/old_doc/triangle.rb +4 -2
  19. data/test/breakpoints_test.rb +1 -2
  20. data/test/conditions_test.rb +3 -4
  21. data/test/continue_test.rb +6 -8
  22. data/test/display_test.rb +1 -2
  23. data/test/edit_test.rb +1 -2
  24. data/test/eval_test.rb +1 -2
  25. data/test/examples/stepping.rb +4 -0
  26. data/test/finish_test.rb +1 -2
  27. data/test/frame_test.rb +1 -2
  28. data/test/help_test.rb +1 -2
  29. data/test/info_test.rb +1 -2
  30. data/test/jump_test.rb +1 -2
  31. data/test/kill_test.rb +1 -2
  32. data/test/list_test.rb +1 -2
  33. data/test/method_test.rb +1 -2
  34. data/test/post_mortem_test.rb +1 -2
  35. data/test/quit_test.rb +1 -2
  36. data/test/reload_test.rb +1 -2
  37. data/test/repl_test.rb +1 -2
  38. data/test/restart_test.rb +1 -2
  39. data/test/save_test.rb +1 -2
  40. data/test/set_test.rb +6 -11
  41. data/test/show_test.rb +5 -4
  42. data/test/source_test.rb +1 -2
  43. data/test/stepping_test.rb +81 -55
  44. data/test/support/test_dsl.rb +54 -54
  45. data/test/test_helper.rb +0 -1
  46. data/test/trace_test.rb +75 -80
  47. data/test/variables_test.rb +1 -2
  48. metadata +6 -5
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'minitest/autorun'
3
2
  require 'pathname'
4
3
  require 'mocha/setup'
@@ -1,108 +1,103 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- describe 'Trace Command' do
4
- include TestDsl
3
+ class TestTrace < TestDsl::TestCase
5
4
 
6
- describe 'Trace Command Setup' do
5
+ before do
6
+ Byebug::Command.settings[:basename] = false
7
+ untrace_var(:$bla) if defined?($bla)
8
+ end
7
9
 
8
- before do
9
- Byebug::Command.settings[:basename] = false
10
- untrace_var(:$bla) if defined?($bla)
11
- end
10
+ describe 'tracing' do
12
11
 
13
- describe 'tracing' do
14
-
15
- describe 'enabling' do
16
- it 'must trace execution by setting trace to on' do
17
- enter 'trace on', 'cont 7', 'trace off'
18
- debug_file 'trace'
19
- check_output_includes 'line tracing is on.',
20
- "Tracing: #{fullpath('trace')}:4 $bla = 4",
21
- "Tracing: #{fullpath('trace')}:7 $bla = 7"
22
- end
23
-
24
- it 'must be able to use a shortcut' do
25
- enter 'tr on', 'cont 7', 'trace off'
26
- debug_file 'trace'
27
- check_output_includes 'line tracing is on.',
28
- "Tracing: #{fullpath('trace')}:4 $bla = 4",
29
- "Tracing: #{fullpath('trace')}:7 $bla = 7"
30
- end
12
+ describe 'enabling' do
13
+ it 'must trace execution by setting trace to on' do
14
+ enter 'trace on', 'cont 7', 'trace off'
15
+ debug_file 'trace'
16
+ check_output_includes 'line tracing is on.',
17
+ "Tracing: #{fullpath('trace')}:4 $bla = 4",
18
+ "Tracing: #{fullpath('trace')}:7 $bla = 7"
31
19
  end
32
20
 
33
- it 'must show an error message if given subcommand is incorrect' do
34
- enter 'trace bla'
21
+ it 'must be able to use a shortcut' do
22
+ enter 'tr on', 'cont 7', 'trace off'
35
23
  debug_file 'trace'
36
- check_output_includes \
37
- 'expecting "on", "off", "var" or "variable"; got: "bla"',
38
- interface.error_queue
24
+ check_output_includes 'line tracing is on.',
25
+ "Tracing: #{fullpath('trace')}:4 $bla = 4",
26
+ "Tracing: #{fullpath('trace')}:7 $bla = 7"
39
27
  end
28
+ end
40
29
 
41
- describe 'disabling' do
42
- it 'must stop tracing by setting trace to off' do
43
- enter 'trace on', 'next', 'trace off'
44
- debug_file 'trace'
45
- check_output_includes "Tracing: #{fullpath('trace')}:4 $bla = 4"
46
- check_output_doesnt_include "Tracing: #{fullpath('trace')}:5 $bla = 5"
47
- end
48
-
49
- it 'must show a message when turned off' do
50
- enter 'trace off'
51
- debug_file 'trace'
52
- check_output_includes 'line tracing is off.'
53
- end
54
- end
30
+ it 'must show an error message if given subcommand is incorrect' do
31
+ enter 'trace bla'
32
+ debug_file 'trace'
33
+ check_output_includes \
34
+ 'expecting "on", "off", "var" or "variable"; got: "bla"',
35
+ interface.error_queue
55
36
  end
56
37
 
57
- describe 'tracing global variables' do
58
- it 'must track global variable' do
59
- enter 'trace variable $bla'
38
+ describe 'disabling' do
39
+ it 'must stop tracing by setting trace to off' do
40
+ enter 'trace on', 'next', 'trace off'
60
41
  debug_file 'trace'
61
- check_output_includes 'traced variable $bla has value 3',
62
- 'traced variable $bla has value 7'
42
+ check_output_includes "Tracing: #{fullpath('trace')}:4 $bla = 4"
43
+ check_output_doesnt_include "Tracing: #{fullpath('trace')}:5 $bla = 5"
63
44
  end
64
45
 
65
- it 'must be able to use a shortcut' do
66
- enter 'trace var $bla'
46
+ it 'must show a message when turned off' do
47
+ enter 'trace off'
67
48
  debug_file 'trace'
68
- check_output_includes 'traced variable $bla has value 3'
49
+ check_output_includes 'line tracing is off.'
69
50
  end
51
+ end
52
+ end
70
53
 
71
- it 'must track global variable with stop' do
72
- enter 'trace variable $bla stop', 'break 7', 'cont'
73
- debug_file('trace') { state.line.must_equal 4 }
74
- end
54
+ describe 'tracing global variables' do
55
+ it 'must track global variable' do
56
+ enter 'trace variable $bla'
57
+ debug_file 'trace'
58
+ check_output_includes 'traced variable $bla has value 3',
59
+ 'traced variable $bla has value 7'
60
+ end
75
61
 
76
- it 'must track global variable with nostop' do
77
- enter 'trace variable $bla nostop', 'break 7', 'cont'
78
- debug_file('trace') { state.line.must_equal 7 }
79
- end
62
+ it 'must be able to use a shortcut' do
63
+ enter 'trace var $bla'
64
+ debug_file 'trace'
65
+ check_output_includes 'traced variable $bla has value 3'
66
+ end
80
67
 
81
- describe 'errors' do
82
- it 'must show an error message if there is no such global variable' do
83
- enter 'trace variable $foo'
84
- debug_file 'trace'
85
- check_output_includes \
86
- '$foo is not a global variable.', interface.error_queue
87
- end
88
-
89
- it 'must show an error message if subcommand is invalid' do
90
- enter 'trace variable $bla foo'
91
- debug_file 'trace'
92
- check_output_includes \
93
- 'expecting "stop" or "nostop"; got "foo"', interface.error_queue
94
- end
95
- end
68
+ it 'must track global variable with stop' do
69
+ enter 'trace variable $bla stop', 'break 7', 'cont'
70
+ debug_file('trace') { state.line.must_equal 4 }
71
+ end
72
+
73
+ it 'must track global variable with nostop' do
74
+ enter 'trace variable $bla nostop', 'break 7', 'cont'
75
+ debug_file('trace') { state.line.must_equal 7 }
96
76
  end
97
77
 
98
- describe 'Post Mortem' do
99
- it 'must work in post-mortem mode' do
100
- enter 'cont', 'trace on'
101
- debug_file 'post_mortem'
102
- check_output_includes 'line tracing is on.'
78
+ describe 'errors' do
79
+ it 'must show an error message if there is no such global variable' do
80
+ enter 'trace variable $foo'
81
+ debug_file 'trace'
82
+ check_output_includes \
83
+ '$foo is not a global variable.', interface.error_queue
84
+ end
85
+
86
+ it 'must show an error message if subcommand is invalid' do
87
+ enter 'trace variable $bla foo'
88
+ debug_file 'trace'
89
+ check_output_includes \
90
+ 'expecting "stop" or "nostop"; got "foo"', interface.error_queue
103
91
  end
104
92
  end
93
+ end
105
94
 
95
+ describe 'Post Mortem' do
96
+ it 'must work in post-mortem mode' do
97
+ enter 'cont', 'trace on'
98
+ debug_file 'post_mortem'
99
+ check_output_includes 'line tracing is on.'
100
+ end
106
101
  end
107
102
 
108
103
  end
@@ -1,7 +1,6 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- describe 'Variables Command' do
4
- include TestDsl
3
+ class TestVariables < TestDsl::TestCase
5
4
 
6
5
  temporary_change_hash Byebug::Command.settings, :width, 40
7
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: byebug
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodríguez
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-20 00:00:00.000000000 Z
13
+ date: 2013-05-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: columnize
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - ~>
90
90
  - !ruby/object:Gem::Version
91
- version: 5.0.1
91
+ version: 5.0.2
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ~>
97
97
  - !ruby/object:Gem::Version
98
- version: 5.0.1
98
+ version: 5.0.2
99
99
  description: |-
100
100
  Byebug is a Ruby 2.0 debugger. It's implemented using the
101
101
  Ruby 2.0 TracePoint C API. The C extension was forked from debase whereas
@@ -161,11 +161,12 @@ files:
161
161
  - lib/byebug/interface.rb
162
162
  - lib/byebug/processor.rb
163
163
  - lib/byebug/version.rb
164
+ - logo.png
164
165
  - old_doc/byebug.1
165
166
  - old_doc/byebug.texi
166
167
  - old_doc/hanoi.rb
167
168
  - old_doc/primes.rb
168
- - old_doc/test-tri2.rb
169
+ - old_doc/test-triangle.rb
169
170
  - old_doc/tri3.rb
170
171
  - old_doc/triangle.rb
171
172
  - test/breakpoints_test.rb