byebug 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/GUIDE.md +209 -0
- data/README.md +11 -2
- data/Rakefile +12 -0
- data/ext/byebug/byebug.c +50 -53
- data/ext/byebug/context.c +0 -24
- data/lib/byebug.rb +23 -7
- data/lib/byebug/command.rb +35 -24
- data/lib/byebug/commands/breakpoints.rb +24 -35
- data/lib/byebug/commands/catchpoint.rb +13 -17
- data/lib/byebug/commands/condition.rb +14 -19
- data/lib/byebug/commands/continue.rb +5 -7
- data/lib/byebug/commands/display.rb +3 -3
- data/lib/byebug/commands/edit.rb +1 -1
- data/lib/byebug/commands/enable.rb +18 -45
- data/lib/byebug/commands/eval.rb +1 -1
- data/lib/byebug/commands/finish.rb +1 -1
- data/lib/byebug/commands/frame.rb +24 -22
- data/lib/byebug/commands/info.rb +91 -122
- data/lib/byebug/commands/jump.rb +3 -8
- data/lib/byebug/commands/list.rb +2 -2
- data/lib/byebug/commands/method.rb +6 -8
- data/lib/byebug/commands/save.rb +1 -1
- data/lib/byebug/commands/set.rb +0 -12
- data/lib/byebug/commands/show.rb +9 -21
- data/lib/byebug/commands/variables.rb +3 -3
- data/lib/byebug/context.rb +13 -2
- data/lib/byebug/interface.rb +13 -7
- data/lib/byebug/processor.rb +23 -25
- data/lib/byebug/version.rb +1 -1
- data/old_doc/primes.rb +1 -4
- data/test/continue_test.rb +2 -9
- data/test/examples/list.rb +1 -1
- data/test/examples/trace.rb +1 -0
- data/test/help_test.rb +1 -1
- data/test/info_test.rb +3 -3
- data/test/list_test.rb +7 -1
- data/test/method_test.rb +0 -1
- data/test/show_test.rb +8 -0
- data/test/support/matchers.rb +4 -2
- data/test/trace_test.rb +18 -1
- metadata +2 -2
data/test/show_test.rb
CHANGED
@@ -267,6 +267,14 @@ class TestShow < TestDsl::TestCase
|
|
267
267
|
end
|
268
268
|
end
|
269
269
|
|
270
|
+
describe 'Help' do
|
271
|
+
it 'must show help when typing just "show"' do
|
272
|
+
enter 'show', 'cont'
|
273
|
+
debug_file 'show'
|
274
|
+
check_output_includes /List of "show" subcommands:/
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
270
278
|
describe 'Post Mortem' do
|
271
279
|
it 'must work in post-mortem mode' do
|
272
280
|
enter 'cont', 'show autolist'
|
data/test/support/matchers.rb
CHANGED
@@ -11,14 +11,16 @@ module MiniTest::Assertions
|
|
11
11
|
#
|
12
12
|
def assert_includes_in_order(given_collection, original_collection, msg = nil)
|
13
13
|
msg = message(msg) do
|
14
|
-
"Expected #{mu_pp(original_collection)}
|
14
|
+
"Expected #{mu_pp(original_collection)} " \
|
15
|
+
"to include #{mu_pp(given_collection)} in order"
|
15
16
|
end
|
16
17
|
assert includes_in_order_result(original_collection, given_collection), msg
|
17
18
|
end
|
18
19
|
|
19
20
|
def refute_includes_in_order(given_collection, original_collection, msg = nil)
|
20
21
|
msg = message(msg) do
|
21
|
-
"Expected #{mu_pp(original_collection)}
|
22
|
+
"Expected #{mu_pp(original_collection)} " \
|
23
|
+
"to not include #{mu_pp(given_collection)} in order"
|
22
24
|
end
|
23
25
|
refute includes_in_order_result(original_collection, given_collection), msg
|
24
26
|
end
|
data/test/trace_test.rb
CHANGED
@@ -3,7 +3,6 @@ require_relative 'test_helper'
|
|
3
3
|
class TestTrace < TestDsl::TestCase
|
4
4
|
|
5
5
|
before do
|
6
|
-
Byebug::Command.settings[:basename] = false
|
7
6
|
untrace_var(:$bla) if defined?($bla)
|
8
7
|
end
|
9
8
|
|
@@ -25,6 +24,24 @@ class TestTrace < TestDsl::TestCase
|
|
25
24
|
"Tracing: #{fullpath('trace')}:4 $bla = 4",
|
26
25
|
"Tracing: #{fullpath('trace')}:7 $bla = 7"
|
27
26
|
end
|
27
|
+
|
28
|
+
it 'must correctly print lines containing % sign' do
|
29
|
+
enter 'cont 7', 'trace on', 'next', 'trace off'
|
30
|
+
debug_file 'trace'
|
31
|
+
check_output_includes \
|
32
|
+
"Tracing: #{fullpath('trace')}:8 $bla = (0 == (7 % $bla))"
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'when basename set' do
|
36
|
+
temporary_change_hash Byebug::Command.settings, :basename, true
|
37
|
+
|
38
|
+
it 'must correctly print file lines' do
|
39
|
+
enter 'tr on', 'cont 7', 'trace off'
|
40
|
+
debug_file 'trace'
|
41
|
+
check_output_includes \
|
42
|
+
"Tracing: #{File.basename(fullpath('trace'))}:7 $bla = 7"
|
43
|
+
end
|
44
|
+
end
|
28
45
|
end
|
29
46
|
|
30
47
|
it 'must show an error message if given subcommand is incorrect' do
|
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.3.
|
4
|
+
version: 1.3.1
|
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-
|
13
|
+
date: 2013-06-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: columnize
|