debugger 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/README.md +9 -3
  3. data/debugger.gemspec +1 -1
  4. data/ext/ruby_debug/192/ruby_debug.c +21 -9
  5. data/ext/ruby_debug/193/ruby_debug.c +15 -5
  6. data/lib/debugger/test.rb +6 -0
  7. data/{test/support → lib/debugger/test}/breakpoint.rb +0 -0
  8. data/{test/support → lib/debugger/test}/context.rb +0 -0
  9. data/{test/support → lib/debugger/test}/matchers.rb +0 -0
  10. data/{test/support → lib/debugger/test}/mocha_extensions.rb +1 -1
  11. data/lib/debugger/test/printer_helpers.rb +8 -0
  12. data/{test/support → lib/debugger/test}/processor.rb +0 -0
  13. data/{test/support → lib/debugger/test}/test_dsl.rb +22 -2
  14. data/{test/support → lib/debugger/test}/test_interface.rb +4 -0
  15. data/lib/debugger/version.rb +1 -1
  16. data/lib/ruby-debug.rb +4 -1
  17. data/lib/ruby-debug/command.rb +18 -6
  18. data/lib/ruby-debug/commands/breakpoints.rb +27 -29
  19. data/lib/ruby-debug/commands/condition.rb +7 -2
  20. data/lib/ruby-debug/commands/continue.rb +1 -2
  21. data/lib/ruby-debug/commands/control.rb +8 -9
  22. data/lib/ruby-debug/commands/display.rb +7 -15
  23. data/lib/ruby-debug/commands/edit.rb +6 -6
  24. data/lib/ruby-debug/commands/enable.rb +6 -7
  25. data/lib/ruby-debug/commands/eval.rb +1 -3
  26. data/lib/ruby-debug/commands/frame.rb +72 -101
  27. data/lib/ruby-debug/commands/info.rb +8 -14
  28. data/lib/ruby-debug/commands/irb.rb +1 -1
  29. data/lib/ruby-debug/commands/jump.rb +6 -6
  30. data/lib/ruby-debug/commands/kill.rb +0 -1
  31. data/lib/ruby-debug/commands/list.rb +4 -4
  32. data/lib/ruby-debug/commands/method.rb +8 -11
  33. data/lib/ruby-debug/commands/quit.rb +1 -1
  34. data/lib/ruby-debug/commands/reload.rb +1 -1
  35. data/lib/ruby-debug/commands/save.rb +1 -1
  36. data/lib/ruby-debug/commands/set.rb +10 -15
  37. data/lib/ruby-debug/commands/show.rb +28 -42
  38. data/lib/ruby-debug/commands/skip.rb +1 -1
  39. data/lib/ruby-debug/commands/source.rb +1 -1
  40. data/lib/ruby-debug/commands/start.rb +26 -0
  41. data/lib/ruby-debug/commands/threads.rb +29 -18
  42. data/lib/ruby-debug/commands/tmate.rb +1 -1
  43. data/lib/ruby-debug/commands/trace.rb +6 -7
  44. data/lib/ruby-debug/commands/variables.rb +36 -19
  45. data/lib/ruby-debug/helper.rb +5 -5
  46. data/lib/ruby-debug/interface.rb +15 -3
  47. data/lib/ruby-debug/printers/base.rb +58 -0
  48. data/lib/ruby-debug/printers/plain.rb +41 -0
  49. data/lib/ruby-debug/printers/texts/base.yml +146 -0
  50. data/lib/ruby-debug/printers/texts/plain.yml +60 -0
  51. data/lib/ruby-debug/processor.rb +56 -47
  52. data/test/breakpoints_test.rb +43 -54
  53. data/test/conditions_test.rb +18 -6
  54. data/test/continue_test.rb +1 -1
  55. data/test/display_test.rb +11 -11
  56. data/test/edit_test.rb +1 -2
  57. data/test/eval_test.rb +5 -6
  58. data/test/finish_test.rb +1 -1
  59. data/test/frame_test.rb +29 -27
  60. data/test/help_test.rb +0 -1
  61. data/test/info_test.rb +10 -14
  62. data/test/irb_test.rb +0 -1
  63. data/test/jump_test.rb +21 -2
  64. data/test/method_test.rb +3 -3
  65. data/test/new/printers/plain_test.rb +84 -0
  66. data/test/reload_test.rb +2 -2
  67. data/test/restart_test.rb +1 -2
  68. data/test/set_test.rb +8 -7
  69. data/test/show_test.rb +22 -22
  70. data/test/source_test.rb +1 -1
  71. data/test/test_helper.rb +2 -1
  72. data/test/thread_test.rb +11 -13
  73. data/test/trace_test.rb +7 -7
  74. data/test/variables_test.rb +33 -15
  75. metadata +20 -12
@@ -15,6 +15,12 @@ describe "Conditions" do
15
15
  it "must assign that expression to breakpoint" do
16
16
  debug_file('conditions') { breakpoint.expr.must_equal "b == 5" }
17
17
  end
18
+
19
+ it "must show a successful message" do
20
+ id = nil
21
+ debug_file('conditions') { id = breakpoint.id }
22
+ check_output_includes "Condition 'b == 5' is set for the breakpoint #{id}"
23
+ end
18
24
  end
19
25
 
20
26
  it "must not stop at the breakpoint if condition is false" do
@@ -49,20 +55,26 @@ describe "Conditions" do
49
55
  it "must not stop on the breakpoint" do
50
56
  debug_file('conditions') { state.line.must_equal 3 }
51
57
  end
58
+
59
+ it "must show a successful message" do
60
+ id = nil
61
+ debug_file('conditions') { id = breakpoint.id }
62
+ check_output_includes "Condition is cleared for the breakpoint #{id}"
63
+ end
52
64
  end
53
65
 
54
66
 
55
67
  describe "errors" do
56
- it "must show error if there are no breakpoints" do
57
- enter 'cond 1 true'
58
- debug_file('conditions')
59
- check_output_includes "No breakpoints have been set."
60
- end
61
-
62
68
  it "must not set breakpoint condition if breakpoint id is incorrect" do
63
69
  enter 'break 3', 'cond 8 b == 3', 'cont'
64
70
  debug_file('conditions') { state.line.must_equal 3 }
65
71
  end
72
+
73
+ it "must show error if there are no breakpoints" do
74
+ enter 'cond 1 true'
75
+ debug_file('conditions')
76
+ check_output_includes "No breakpoints have been set"
77
+ end
66
78
  end
67
79
 
68
80
 
@@ -21,7 +21,7 @@ describe "Continue Command" do
21
21
  it "must show error if there is no specified line" do
22
22
  enter 'cont 123'
23
23
  debug_file('continue')
24
- check_output_includes "Line 123 is not a stopping point in file \"#{fullpath('continue')}\".", interface.error_queue
24
+ check_output_includes "Line 123 is not a stopping point in file '#{fullpath('continue')}'", interface.error_queue
25
25
  end
26
26
 
27
27
  it "must ignore the line if the context is dead"
data/test/display_test.rb CHANGED
@@ -6,13 +6,13 @@ describe "Display Command" do
6
6
  it "must show expressions" do
7
7
  enter 'display d + 1', 'break 3', 'cont'
8
8
  debug_file('display')
9
- check_output_includes "1: ", "d + 1 = 5"
9
+ check_output_includes "1: d + 1 = 5"
10
10
  end
11
11
 
12
12
  it "must work with shortcut" do
13
13
  enter 'disp d + 1', 'break 3', 'cont'
14
14
  debug_file('display')
15
- check_output_includes "1: ", "d + 1 = 5"
15
+ check_output_includes "1: d + 1 = 5"
16
16
  end
17
17
 
18
18
  it "must save displayed expressions" do
@@ -25,7 +25,7 @@ describe "Display Command" do
25
25
  Debugger.handler.display.concat([[true, "abc"], [true, "d"]]); 'display'
26
26
  end
27
27
  debug_file('display')
28
- check_output_includes "1: ", "abc = ", "2: ", "d = 4"
28
+ check_output_includes "1: abc = \n2: d = 4"
29
29
  end
30
30
 
31
31
  describe "undisplay" do
@@ -51,7 +51,7 @@ describe "Display Command" do
51
51
 
52
52
  it "must not show any output" do
53
53
  debug_file('display')
54
- check_output_doesnt_include "1: ", "abc = ", "2: ", "d = 4"
54
+ check_output_doesnt_include "1: abc = \n2: d = 4"
55
55
  end
56
56
  end
57
57
 
@@ -64,7 +64,7 @@ describe "Display Command" do
64
64
 
65
65
  it "must not show any output" do
66
66
  debug_file('display')
67
- check_output_includes "1: ", "abc = ", "2: ", "d = 4"
67
+ check_output_includes "1: abc = \n2: d = 4"
68
68
  end
69
69
  end
70
70
  end
@@ -83,12 +83,12 @@ describe "Display Command" do
83
83
 
84
84
  it "must display only the active position" do
85
85
  debug_file('display')
86
- check_output_includes "2: ", "d = 4"
86
+ check_output_includes "2: d = 4"
87
87
  end
88
88
 
89
89
  it "must not display the disabled position" do
90
90
  debug_file('display')
91
- check_output_doesnt_include "1: ", "abc"
91
+ check_output_doesnt_include "1: abc"
92
92
  end
93
93
  end
94
94
  end
@@ -102,13 +102,13 @@ describe "Display Command" do
102
102
  it "must show an error if no displays are set" do
103
103
  enter 'disable display 1'
104
104
  debug_file('display')
105
- check_output_includes "No display expressions have been set.", interface.error_queue
105
+ check_output_includes "No display expressions have been set", interface.error_queue
106
106
  end
107
107
 
108
108
  it "must show an error if there is no such display position" do
109
109
  enter 'display d', 'disable display 4'
110
110
  debug_file('display')
111
- check_output_includes "Disable display argument '4' needs to at most 1."
111
+ check_output_includes "Disable display argument '4' needs to at most 1"
112
112
  end
113
113
  end
114
114
 
@@ -125,7 +125,7 @@ describe "Display Command" do
125
125
  it "must show display expression in annotation" do
126
126
  enter 'display 2 + 2', 'set annotate 3', 'next', 'next'
127
127
  debug_file 'display'
128
- check_output_includes "\x1A\x1Adisplay", "1:", "2 + 2 = 4"
128
+ check_output_includes "\x1A\x1Adisplay", "1: 2 + 2 = 4"
129
129
  end
130
130
  end
131
131
 
@@ -134,7 +134,7 @@ describe "Display Command" do
134
134
  it "must be able to set display expressions in post-mortem mode" do
135
135
  enter 'cont', 'display 2 + 2', 'cont'
136
136
  debug_file("post_mortem")
137
- check_output_includes "1:", "2 + 2 = 4"
137
+ check_output_includes "1: 2 + 2 = 4"
138
138
  end
139
139
  end
140
140
 
data/test/edit_test.rb CHANGED
@@ -30,7 +30,7 @@ describe "Edit Command" do
30
30
  it "must show an error if there is no such line" do
31
31
  enter "edit #{fullpath('edit3')}:6"
32
32
  debug_file 'edit'
33
- check_output_includes "File \"#{fullpath('edit3')}\" is not readable.", interface.error_queue
33
+ check_output_includes "File '#{fullpath('edit3')}' is not readable", interface.error_queue
34
34
  end
35
35
 
36
36
  it "must show an error if there is incorrect syntax" do
@@ -39,7 +39,6 @@ describe "Edit Command" do
39
39
  check_output_includes "Invalid file/line number specification: blabla", interface.error_queue
40
40
  end
41
41
 
42
-
43
42
  describe "Post Mortem" do
44
43
  # TODO: This test fails with "Segmentation fault". Probably need to fix it somehow, or forbid this
45
44
  # command in the post mortem mode
data/test/eval_test.rb CHANGED
@@ -31,25 +31,24 @@ describe "Eval Command" do
31
31
  end
32
32
  end
33
33
 
34
- describe "stack trace on error" do
34
+ describe "evaluate with error" do
35
35
  temporary_change_hash_value(Debugger::Command.settings, :stack_trace_on_error, false)
36
36
 
37
37
  it "must show a stack trace if showing trace on error is enabled" do
38
38
  enter 'set notrace', 'eval 2 / 0'
39
39
  debug_file 'eval'
40
- check_output_includes "ZeroDivisionError Exception: divided by 0"
41
- check_output_doesnt_include /\S+:\d+:in `eval':divided by 0/
40
+ check_output_includes "ZeroDivisionError Exception: divided by 0", interface.error_queue
41
+ check_output_doesnt_include /\S+:\d+:in `eval':divided by 0/, interface.error_queue
42
42
  end
43
43
 
44
44
  it "must show a stack trace if showing trace on error is enabled" do
45
45
  enter 'set trace', 'eval 2 / 0'
46
46
  debug_file 'eval'
47
- check_output_includes /\S+:\d+:in `eval':divided by 0/
48
- check_output_doesnt_include "ZeroDivisionError Exception: divided by 0"
47
+ check_output_includes /\S+:\d+:in `eval':divided by 0/, interface.error_queue
48
+ check_output_doesnt_include "ZeroDivisionError Exception: divided by 0", interface.error_queue
49
49
  end
50
50
  end
51
51
 
52
-
53
52
  it "must pretty print the expression result" do
54
53
  enter 'pp {a: "3" * 40, b: "4" * 30}'
55
54
  debug_file 'eval'
data/test/finish_test.rb CHANGED
@@ -28,7 +28,7 @@ describe "Finish Command" do
28
28
 
29
29
  it "must show an error" do
30
30
  debug_file('finish')
31
- check_output_includes "Finish argument 'foo' needs to be a number."
31
+ check_output_includes "Finish argument 'foo' needs to be a number"
32
32
  end
33
33
 
34
34
  it "must be on the same line" do
data/test/frame_test.rb CHANGED
@@ -36,7 +36,7 @@ describe "Frame Command" do
36
36
  it "must print current stack frame when without arguments" do
37
37
  enter 'break 25', 'cont', 'up', 'frame'
38
38
  debug_file('frame')
39
- check_output_includes "#0 ", "A.d(e#String)"
39
+ check_output_includes "#0 A.d(e#String)\n at line #{fullpath('frame')}:25"
40
40
  end
41
41
 
42
42
  it "must set frame to the first one" do
@@ -46,19 +46,19 @@ describe "Frame Command" do
46
46
 
47
47
  it "must set frame to the last one" do
48
48
  enter 'break 25', 'cont', 'frame -1'
49
- debug_file('frame') { state.line.must_equal 73 }
49
+ debug_file('frame') { state.line.must_equal 29 }
50
50
  end
51
51
 
52
52
  it "must not set frame if the frame number is too low" do
53
53
  enter 'break 25', 'cont', 'down'
54
54
  debug_file('frame') { state.line.must_equal 25 }
55
- check_output_includes "Adjusting would put us beyond the newest (innermost) frame.", interface.error_queue
55
+ check_output_includes "Adjusting would put us beyond the newest (innermost) frame", interface.error_queue
56
56
  end
57
57
 
58
58
  it "must not set frame if the frame number is too high" do
59
59
  enter 'break 25', 'cont', 'up 100'
60
60
  debug_file('frame') { state.line.must_equal 25 }
61
- check_output_includes "Adjusting would put us beyond the oldest (initial) frame.", interface.error_queue
61
+ check_output_includes "Adjusting would put us beyond the oldest (initial) frame", interface.error_queue
62
62
  end
63
63
 
64
64
  describe "full path settings" do
@@ -72,45 +72,47 @@ describe "Frame Command" do
72
72
  it "must display current backtrace with full path = true" do
73
73
  enter 'set fullpath', 'break 25', 'cont', 'where'
74
74
  debug_file('frame')
75
- check_output_includes(
76
- "-->", "#0", "A.d(e#String)", "at line #{fullpath('frame')}:25",
77
- "#1", "A.c", "at line #{fullpath('frame')}:21"
78
- )
75
+ check_output_includes(Regexp.new(
76
+ "--> #0 A.d\\(e#String\\)\\n" +
77
+ " at line #{fullpath('frame')}:25\\n" +
78
+ " #1 A.c at line #{fullpath('frame')}:21\\n",
79
+ Regexp::MULTILINE))
79
80
  end
80
81
 
81
82
  it "must display current backtrace with full path = false" do
82
83
  enter 'set nofullpath', 'break 25', 'cont', 'where'
83
84
  debug_file('frame')
84
- check_output_includes(
85
- "-->", "#0", "A.d(e#String)", "at line #{short_path(fullpath('frame'))}:25",
86
- "#1", "A.c", "at line #{short_path(fullpath('frame'))}:21"
87
- )
85
+ check_output_includes(Regexp.new(
86
+ "--> #0 A.d\\(e#String\\) at line #{short_path(fullpath('frame'))}:25\\n" +
87
+ " #1 A.c at line #{short_path(fullpath('frame'))}:21",
88
+ Regexp::MULTILINE))
88
89
  end
89
90
  end
90
91
 
91
92
  describe "display backtrace with callstyle" do
92
93
  temporary_change_hash_value(Debugger::Command.settings, :callstyle, :last)
93
94
 
94
- it "must display current backtrace" do
95
+ it "must display current backtrace with last callstyle" do
95
96
  enter 'set callstyle last', 'break 25', 'cont', 'where'
96
97
  debug_file('frame')
97
- check_output_includes(
98
- "-->", "#0", "A.d(e#String)", "at line #{fullpath('frame')}:25",
99
- "#1", "A.c", "at line #{fullpath('frame')}:21",
100
- "#2", "A.b", "at line #{fullpath('frame')}:17",
101
- "#3", "A.a", "at line #{fullpath('frame')}:14"
102
- )
98
+ check_output_includes(Regexp.new(
99
+ "--> #0 A.d\\(e#String\\)\\n" +
100
+ " at line #{fullpath('frame')}:25\\n" +
101
+ " #1 A.c at line #{fullpath('frame')}:21\\n" +
102
+ " #2 A.b at line #{fullpath('frame')}:17\\n" +
103
+ " #3 A.a at line #{fullpath('frame')}:14\\n",
104
+ Regexp::MULTILINE))
103
105
  end
104
106
 
105
- it "must display current backtrace" do
107
+ it "must display current backtrace with short callstyle" do
106
108
  enter 'set callstyle short', 'break 25', 'cont', 'where'
107
109
  debug_file('frame')
108
- check_output_includes(
109
- "-->", "#0", "d(e)", "at line #{fullpath('frame')}:25",
110
- "#1", "c", "at line #{fullpath('frame')}:21",
111
- "#2", "b", "at line #{fullpath('frame')}:17",
112
- "#3", "a", "at line #{fullpath('frame')}:14"
113
- )
110
+ check_output_includes(Regexp.new(
111
+ "--> #0 d\\(e\\) at line #{fullpath('frame')}:25\\n" +
112
+ " #1 c at line #{fullpath('frame')}:21\\n" +
113
+ " #2 b at line #{fullpath('frame')}:17\\n" +
114
+ " #3 a at line #{fullpath('frame')}:14\\n",
115
+ Regexp::MULTILINE))
114
116
  end
115
117
 
116
118
  # NOTE: We also have support of 'tracked' callstyle in the code, but by some reason
@@ -118,7 +120,7 @@ describe "Frame Command" do
118
120
  it "must not set 'tracked' callstyle" do
119
121
  enter 'set callstyle tracked'
120
122
  debug_file('frame')
121
- check_output_includes "Invalid call style tracked. Should be one of: 'short' or 'last'."
123
+ check_output_includes "Invalid call style tracked. Should be one of: 'short' or 'last'"
122
124
  Debugger::Command.settings[:callstyle].must_equal :last
123
125
  end
124
126
  end
data/test/help_test.rb CHANGED
@@ -38,7 +38,6 @@ describe "Help Command" do
38
38
  check_output_includes Debugger::AddBreakpoint.help(nil).split("\n").map { |l| l.gsub(/^ +/, '') }.join("\n")
39
39
  end
40
40
 
41
-
42
41
  describe "Post Mortem" do
43
42
  it "must work in post-mortem mode" do
44
43
  enter 'cont', 'help'
data/test/info_test.rb CHANGED
@@ -162,7 +162,7 @@ describe "Info Command" do
162
162
  it "must show instance variables" do
163
163
  enter 'break 21', 'cont', 'info instance_variables'
164
164
  debug_file 'info'
165
- check_output_includes '@bla = "blabla"', '@foo = "bar"'
165
+ check_output_includes %{@bla = "blabla"\n@foo = "bar"}
166
166
  end
167
167
  end
168
168
 
@@ -224,10 +224,10 @@ describe "Info Command" do
224
224
  it "must show stack info" do
225
225
  enter 'break 20', 'cont', 'info stack'
226
226
  debug_file 'info'
227
- check_output_includes(
228
- "-->", "#0", "A.a", "at line #{fullpath('info')}:20",
229
- "#1", "at line #{fullpath('info')}:30"
230
- )
227
+ check_output_includes(Regexp.new(
228
+ "--> #0 A.a at line #{fullpath('info')}:20\\n" +
229
+ " #1 A.b at line #{fullpath('info')}:30\\n",
230
+ Regexp::MULTILINE))
231
231
  end
232
232
  end
233
233
 
@@ -256,13 +256,13 @@ describe "Info Command" do
256
256
  thread_number = nil
257
257
  enter ->{thread_number = context.thnum; "info thread #{context.thnum}"}
258
258
  debug_file 'info'
259
- check_output_includes "+", thread_number.to_s, /#<Thread:\S+ run>/
259
+ check_output_includes /\+ #{thread_number} #<Thread:\S+ run>/
260
260
  end
261
261
 
262
262
  it "must show verbose thread info" do
263
263
  enter 'break 20', 'cont', ->{"info thread #{context.thnum} verbose"}
264
264
  debug_file 'info'
265
- check_output_includes /#<Thread:\S+ run>/, "#0", "A.a", "at line #{fullpath('info')}:20"
265
+ check_output_includes /#<Thread:\S+ run>/, "#0 A.a at line #{fullpath('info')}:20"
266
266
  end
267
267
 
268
268
  it "must show error when unknown parameter is used" do
@@ -276,7 +276,7 @@ describe "Info Command" do
276
276
  it "must show global variables" do
277
277
  enter 'info global_variables'
278
278
  debug_file 'info'
279
- check_output_includes "$$ = #{Process.pid}"
279
+ check_output_includes /\$\$ = #{Process.pid}/
280
280
  end
281
281
  end
282
282
 
@@ -289,8 +289,7 @@ describe "Info Command" do
289
289
  'a = "1111111111111111111111...',
290
290
  "b = 2",
291
291
  /self = #<A:\S+.../,
292
- '@bla = "blabla"',
293
- '@foo = "bar"'
292
+ /@bla = "blabla"\n@foo = "bar"/
294
293
  )
295
294
  end
296
295
  end
@@ -301,8 +300,7 @@ describe "Info Command" do
301
300
  check_output_includes(
302
301
  'a = *Error in evaluation*',
303
302
  /self = #<A:\S+.../,
304
- '@bla = "blabla"',
305
- '@foo = "bar"'
303
+ /@bla = "blabla"\n@foo = "bar"/
306
304
  )
307
305
  end
308
306
 
@@ -313,7 +311,6 @@ describe "Info Command" do
313
311
  end
314
312
  end
315
313
 
316
-
317
314
  describe "Post Mortem" do
318
315
  it "must work in post-mortem mode" do
319
316
  enter 'cont', 'info line'
@@ -321,5 +318,4 @@ describe "Info Command" do
321
318
  check_output_includes "Line 8 of \"#{fullpath('post_mortem')}\""
322
319
  end
323
320
  end
324
-
325
321
  end
data/test/irb_test.rb CHANGED
@@ -69,7 +69,6 @@ describe "Irb Command" do
69
69
  end
70
70
  end
71
71
 
72
-
73
72
  describe "Post Mortem" do
74
73
  it "must work in post-mortem mode" do
75
74
  irb.stubs(:eval_input).throws(:IRB_EXIT, :cont)
data/test/jump_test.rb CHANGED
@@ -9,11 +9,24 @@ describe "Jump Command" do
9
9
  debug_file('jump') { state.line.must_equal 8 }
10
10
  end
11
11
 
12
+ describe "jumping to the same line" do
13
+ it "must jump to the same line" do
14
+ enter 'break 6', 'cont', "jump 6 #{fullpath('jump')}"
15
+ debug_file('jump') { state.line.must_equal 6 }
16
+ end
17
+
18
+ it "must show show the same position" do
19
+ enter 'break 6', 'cont', "jump 6 #{fullpath('jump')}"
20
+ debug_file('jump')
21
+ check_output_includes "#{fullpath('jump')}:6\nb = 3"
22
+ end
23
+ end
24
+
12
25
  it "must not initialize skipped variables during jump" do
13
26
  enter 'break 6', 'cont', "jump 8 #{fullpath('jump')}", 'next'
14
27
  enter 'var local'
15
28
  debug_file('jump')
16
- check_output_includes "a => 2", "b => nil", "c => nil", "d => 5"
29
+ check_output_includes /a = 2\nb = nil\nc = nil\nd = 5\ne = nil\nf = nil/
17
30
  end
18
31
 
19
32
  it "must jump with relative line number (-)" do
@@ -25,6 +38,12 @@ describe "Jump Command" do
25
38
  enter 'break 8', 'cont', "jump +2 #{fullpath('jump')}"
26
39
  debug_file('jump') { state.line.must_equal 10 }
27
40
  end
41
+
42
+ it "must show message after jump" do
43
+ enter 'break 6', 'cont', "jump 8 #{fullpath('jump')}"
44
+ debug_file('jump')
45
+ check_output_includes "#{fullpath('jump')}:8\nd = 5"
46
+ end
28
47
  end
29
48
 
30
49
  describe "errors" do
@@ -37,7 +56,7 @@ describe "Jump Command" do
37
56
  it "must show an error if line number is not specified" do
38
57
  enter 'jump'
39
58
  debug_file('jump')
40
- check_output_includes '"jump" must be followed by a line number', interface.error_queue
59
+ check_output_includes "'jump' must be followed by a line number", interface.error_queue
41
60
  end
42
61
 
43
62
  describe "when there is no active code in specified line" do