byebug 3.1.2 → 3.2.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/CHANGELOG.md +15 -0
- data/GUIDE.md +17 -35
- data/Gemfile +8 -5
- data/LICENSE +1 -1
- data/README.md +10 -22
- data/Rakefile +1 -1
- data/ext/byebug/byebug.c +3 -2
- data/lib/byebug.rb +3 -38
- data/lib/byebug/commands/break.rb +83 -0
- data/lib/byebug/commands/catchpoint.rb +0 -1
- data/lib/byebug/commands/condition.rb +10 -6
- data/lib/byebug/commands/continue.rb +3 -6
- data/lib/byebug/commands/delete.rb +38 -0
- data/lib/byebug/commands/edit.rb +0 -2
- data/lib/byebug/commands/enable.rb +7 -8
- data/lib/byebug/commands/finish.rb +0 -2
- data/lib/byebug/commands/frame.rb +13 -15
- data/lib/byebug/commands/help.rb +1 -3
- data/lib/byebug/commands/history.rb +3 -3
- data/lib/byebug/commands/info.rb +4 -13
- data/lib/byebug/commands/interrupt.rb +25 -0
- data/lib/byebug/commands/kill.rb +0 -2
- data/lib/byebug/commands/list.rb +2 -4
- data/lib/byebug/commands/method.rb +2 -8
- data/lib/byebug/commands/quit.rb +0 -2
- data/lib/byebug/commands/reload.rb +2 -15
- data/lib/byebug/commands/repl.rb +0 -3
- data/lib/byebug/commands/{control.rb → restart.rb} +2 -26
- data/lib/byebug/commands/save.rb +0 -1
- data/lib/byebug/commands/set.rb +4 -7
- data/lib/byebug/commands/show.rb +0 -3
- data/lib/byebug/commands/source.rb +0 -3
- data/lib/byebug/commands/stepping.rb +3 -4
- data/lib/byebug/commands/trace.rb +0 -1
- data/lib/byebug/commands/variables.rb +3 -4
- data/lib/byebug/context.rb +0 -1
- data/lib/byebug/helper.rb +23 -0
- data/lib/byebug/interfaces/script_interface.rb +1 -1
- data/lib/byebug/processors/command_processor.rb +9 -9
- data/lib/byebug/remote.rb +2 -2
- data/lib/byebug/setting.rb +3 -1
- data/lib/byebug/settings/autoeval.rb +3 -1
- data/lib/byebug/settings/autoirb.rb +3 -1
- data/lib/byebug/settings/autolist.rb +3 -1
- data/lib/byebug/settings/autoreload.rb +1 -3
- data/lib/byebug/settings/autosave.rb +1 -3
- data/lib/byebug/settings/callstyle.rb +2 -4
- data/lib/byebug/settings/fullpath.rb +1 -3
- data/lib/byebug/settings/histfile.rb +1 -3
- data/lib/byebug/settings/histsize.rb +0 -4
- data/lib/byebug/settings/listsize.rb +1 -3
- data/lib/byebug/settings/post_mortem.rb +14 -1
- data/lib/byebug/settings/width.rb +1 -17
- data/lib/byebug/version.rb +1 -1
- data/test/break_test.rb +376 -0
- data/test/condition_test.rb +82 -0
- data/test/continue_test.rb +27 -30
- data/test/debugger_alias_test.rb +4 -4
- data/test/delete_test.rb +26 -0
- data/test/display_test.rb +80 -102
- data/test/edit_test.rb +28 -31
- data/test/eval_test.rb +50 -80
- data/test/finish_test.rb +23 -23
- data/test/frame_test.rb +172 -186
- data/test/help_test.rb +27 -37
- data/test/history_test.rb +32 -41
- data/test/info_test.rb +198 -230
- data/test/interrupt_test.rb +17 -36
- data/test/irb_test.rb +47 -0
- data/test/kill_test.rb +19 -19
- data/test/list_test.rb +126 -133
- data/test/method_test.rb +21 -54
- data/test/post_mortem_test.rb +44 -46
- data/test/pry_test.rb +42 -0
- data/test/quit_test.rb +17 -15
- data/test/reload_test.rb +23 -28
- data/test/restart_test.rb +35 -63
- data/test/save_test.rb +46 -62
- data/test/set_test.rb +93 -144
- data/test/show_test.rb +50 -71
- data/test/source_test.rb +23 -26
- data/test/stepping_test.rb +125 -153
- data/test/support/matchers.rb +1 -6
- data/test/support/test_interface.rb +1 -1
- data/test/support/{test_dsl.rb → utils.rb} +17 -64
- data/test/test_helper.rb +25 -7
- data/test/thread_test.rb +101 -89
- data/test/trace_test.rb +48 -85
- data/test/variables_test.rb +43 -80
- metadata +18 -13
- data/lib/byebug/commands/breakpoints.rb +0 -137
- data/lib/byebug/commands/skip.rb +0 -30
- data/test/breakpoints_test.rb +0 -474
- data/test/conditions_test.rb +0 -82
- data/test/repl_test.rb +0 -75
data/test/save_test.rb
CHANGED
@@ -1,83 +1,67 @@
|
|
1
|
-
module
|
2
|
-
class SaveTestCase <
|
3
|
-
|
1
|
+
module Byebug
|
2
|
+
class SaveTestCase < TestCase
|
3
|
+
def setup
|
4
4
|
@example = -> do
|
5
5
|
byebug
|
6
6
|
a = 2
|
7
7
|
a = 3
|
8
8
|
end
|
9
|
-
end
|
10
|
-
|
11
|
-
describe 'successful saving' do
|
12
|
-
let(:file_name) { 'save_output.txt' }
|
13
|
-
let(:file_contents) { File.read(file_name) }
|
14
|
-
before do
|
15
|
-
enter 'break 2', 'break 3 if true', 'catch NoMethodError',
|
16
|
-
'display 2 + 3', 'display 5 + 6', "save #{file_name}"
|
17
|
-
debug_proc(@example)
|
18
|
-
end
|
19
|
-
after do
|
20
|
-
File.delete(file_name)
|
21
|
-
end
|
22
9
|
|
23
|
-
|
24
|
-
file_contents.must_include "break #{__FILE__}:2"
|
25
|
-
end
|
10
|
+
super
|
26
11
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
it 'must save catchpoints' do
|
32
|
-
file_contents.must_include 'catch NoMethodError'
|
33
|
-
end
|
12
|
+
enter 'break 2', 'break 3 if true', 'catch NoMethodError',
|
13
|
+
'display 2 + 3', 'save save_output.txt'
|
14
|
+
debug_proc(@example)
|
15
|
+
end
|
34
16
|
|
35
|
-
|
36
|
-
|
37
|
-
|
17
|
+
def teardown
|
18
|
+
File.delete('save_output.txt')
|
19
|
+
end
|
38
20
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
21
|
+
def file_contents
|
22
|
+
@file_contents ||= File.read('save_output.txt')
|
23
|
+
end
|
43
24
|
|
44
|
-
|
45
|
-
|
46
|
-
|
25
|
+
def test_save_records_regular_breakpoints
|
26
|
+
assert_includes file_contents, "break #{__FILE__}:2"
|
27
|
+
end
|
47
28
|
|
48
|
-
|
49
|
-
|
50
|
-
|
29
|
+
def test_save_records_conditional_breakpoints
|
30
|
+
assert_includes file_contents, "break #{__FILE__}:3 if true"
|
31
|
+
end
|
51
32
|
|
52
|
-
|
53
|
-
|
54
|
-
|
33
|
+
def test_save_records_catchpoints
|
34
|
+
assert_includes file_contents, 'catch NoMethodError'
|
35
|
+
end
|
55
36
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
37
|
+
def test_save_records_displays
|
38
|
+
assert_includes file_contents, 'display 2 + 3'
|
39
|
+
end
|
60
40
|
|
61
|
-
|
62
|
-
|
63
|
-
|
41
|
+
def test_save_records_current_state_of_settings
|
42
|
+
assert_includes file_contents, 'set autoeval true'
|
43
|
+
assert_includes file_contents, 'set basename false'
|
44
|
+
assert_includes file_contents, 'set testing true'
|
45
|
+
assert_includes file_contents, 'set autolist false'
|
46
|
+
assert_includes file_contents, 'set autoirb false'
|
64
47
|
end
|
65
48
|
|
66
|
-
|
67
|
-
|
68
|
-
|
49
|
+
def test_save_shows_a_success_message
|
50
|
+
check_output_includes "Saved to 'save_output.txt'"
|
51
|
+
end
|
69
52
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
53
|
+
def test_save_without_a_filename_uses_a_default_file
|
54
|
+
enter 'save'
|
55
|
+
debug_proc(@example)
|
56
|
+
assert_includes File.read(interface.restart_file), 'set autoirb false'
|
57
|
+
FileUtils.rm(interface.restart_file)
|
58
|
+
end
|
75
59
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
60
|
+
def test_save_without_a_filename_shows_a_message_with_the_file_used
|
61
|
+
enter 'save'
|
62
|
+
debug_proc(@example)
|
63
|
+
check_output_includes "Saved to '#{interface.restart_file}'"
|
64
|
+
FileUtils.rm(interface.restart_file)
|
81
65
|
end
|
82
66
|
end
|
83
67
|
end
|
data/test/set_test.rb
CHANGED
@@ -1,183 +1,132 @@
|
|
1
|
-
module
|
2
|
-
class SetTestCase <
|
3
|
-
|
1
|
+
module Byebug
|
2
|
+
class SetTestCase < TestCase
|
3
|
+
def setup
|
4
4
|
@example = -> do
|
5
5
|
byebug
|
6
6
|
a = 2
|
7
7
|
a += 1
|
8
8
|
end
|
9
|
+
|
10
|
+
super
|
9
11
|
end
|
10
12
|
|
11
13
|
[:autoeval, :autolist, :autoreload, :autosave, :basename, :forcestep,
|
12
|
-
:fullpath, :post_mortem, :stack_on_error, :testing,
|
13
|
-
:tracing_plus].each do |
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
enter "set #{setting} on"
|
19
|
-
debug_proc(@example)
|
20
|
-
Byebug::Setting[setting].must_equal true
|
21
|
-
end
|
22
|
-
|
23
|
-
it "must set #{setting} to on using 1" do
|
24
|
-
enter "set #{setting} 1"
|
25
|
-
debug_proc(@example)
|
26
|
-
Byebug::Setting[setting].must_equal true
|
27
|
-
end
|
28
|
-
|
29
|
-
it "must set #{setting} to on by default" do
|
30
|
-
enter "set #{setting}"
|
14
|
+
:fullpath, :post_mortem, :stack_on_error, :testing,
|
15
|
+
:tracing_plus].each do |set|
|
16
|
+
['on', '1', 'true', ''].each do |key|
|
17
|
+
define_method(:"test_enable_boolean_setting_#{set}_using_#{key}") do
|
18
|
+
Setting[set] = false
|
19
|
+
enter "set #{set} #{key}"
|
31
20
|
debug_proc(@example)
|
32
|
-
|
21
|
+
assert_equal true, Setting[set]
|
33
22
|
end
|
34
23
|
end
|
35
24
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
enter "set #{setting} off"
|
41
|
-
debug_proc(@example)
|
42
|
-
Byebug::Setting[setting].must_equal false
|
43
|
-
end
|
44
|
-
|
45
|
-
it "must set #{setting} to on using 0" do
|
46
|
-
enter "set #{setting} 0"
|
25
|
+
['off', '0', 'false'].each do |key|
|
26
|
+
define_method(:"test_disable_boolean_setting_#{set}_using_#{key}") do
|
27
|
+
Setting[set] = true
|
28
|
+
enter "set #{set} #{key}"
|
47
29
|
debug_proc(@example)
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
it "must set #{setting} to off using 'no' prefix" do
|
52
|
-
enter "set no#{setting}"
|
53
|
-
debug_proc(@example)
|
54
|
-
Byebug::Setting[setting].must_equal false
|
30
|
+
assert_equal false, Setting[set]
|
55
31
|
end
|
56
32
|
end
|
57
|
-
end
|
58
33
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
enter 'set autos'
|
65
|
-
debug_proc(@example)
|
66
|
-
Byebug::Setting[:autosave].must_equal true
|
67
|
-
end
|
68
|
-
|
69
|
-
it 'must not set setting if shortcut is ambiguous' do
|
70
|
-
enter 'set auto'
|
71
|
-
debug_proc(@example)
|
72
|
-
Byebug::Setting[:autosave].must_equal false
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
describe 'unsetting' do
|
77
|
-
temporary_change_hash Byebug::Setting, :autosave, true
|
78
|
-
|
79
|
-
it 'must unset setting if shortcut not ambiguous' do
|
80
|
-
enter 'set noautos'
|
81
|
-
debug_proc(@example)
|
82
|
-
Byebug::Setting[:autosave].must_equal false
|
83
|
-
end
|
84
|
-
|
85
|
-
it 'must not set setting to off if shortcut ambiguous' do
|
86
|
-
enter 'set noauto'
|
87
|
-
debug_proc(@example)
|
88
|
-
Byebug::Setting[:autosave].must_equal true
|
89
|
-
end
|
34
|
+
define_method(:"test_disable_boolean_setting_#{set}_using_no_prefix") do
|
35
|
+
Setting[set] = true
|
36
|
+
enter "set no#{set}"
|
37
|
+
debug_proc(@example)
|
38
|
+
assert_equal false, Setting[set]
|
90
39
|
end
|
91
40
|
end
|
92
41
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
it 'must get set' do
|
99
|
-
enter 'set testing', 'break 7', 'cont'
|
100
|
-
debug_proc(@example) {
|
101
|
-
state.must_be_kind_of Byebug::CommandProcessor::State }
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
describe 'when setting "testing" to off' do
|
106
|
-
temporary_change_hash Byebug::Setting, :testing, true
|
107
|
-
|
108
|
-
it 'must get unset' do
|
109
|
-
enter 'set notesting', 'break 7', 'cont'
|
110
|
-
debug_proc(@example) { state.must_be_nil }
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
42
|
+
def test_set_enables_a_setting_using_shorcut_when_not_ambiguous
|
43
|
+
Setting[:forcestep] = false
|
44
|
+
enter 'set fo'
|
45
|
+
debug_proc(@example)
|
46
|
+
assert_equal true, Setting[:forcestep]
|
114
47
|
end
|
115
48
|
|
116
|
-
|
117
|
-
|
49
|
+
def test_set_does_not_enable_a_setting_using_shorcut_when_ambiguous
|
50
|
+
Setting[:forcestep] = false
|
51
|
+
Setting[:fullpath] = false
|
52
|
+
enter 'set f'
|
53
|
+
debug_proc(@example)
|
54
|
+
assert_equal false, Setting[:forcestep]
|
55
|
+
assert_equal false, Setting[:fullpath]
|
56
|
+
end
|
118
57
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
58
|
+
def test_set_disables_a_setting_using_shorcut_when_not_ambiguous
|
59
|
+
Setting[:forcestep] = true
|
60
|
+
enter 'set nofo'
|
61
|
+
debug_proc(@example)
|
62
|
+
assert_equal false, Setting[:forcestep]
|
63
|
+
end
|
124
64
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
65
|
+
def test_set_does_not_disable_a_setting_using_shorcut_when_ambiguous
|
66
|
+
Setting[:forcestep] = true
|
67
|
+
Setting[:fullpath] = true
|
68
|
+
enter 'set nof'
|
69
|
+
debug_proc(@example)
|
70
|
+
assert_equal true, Setting[:forcestep]
|
71
|
+
assert_equal true, Setting[:fullpath]
|
72
|
+
end
|
130
73
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
74
|
+
def test_set_testing_sets_the_thread_state_variable
|
75
|
+
Setting[:testing] = false
|
76
|
+
enter 'set testing', 'break 7', 'cont'
|
77
|
+
debug_proc(@example) do
|
78
|
+
assert_kind_of CommandProcessor::State, state
|
135
79
|
end
|
136
80
|
end
|
137
81
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
it 'must set history filename' do
|
144
|
-
enter "set histfile #{filename}"
|
145
|
-
debug_proc(@example)
|
146
|
-
Byebug::Setting[:histfile].must_equal filename
|
147
|
-
end
|
82
|
+
def test_set_notesting_unsets_the_thread_state_variable
|
83
|
+
Setting[:testing] = true
|
84
|
+
enter 'set notesting', 'break 7', 'cont'
|
85
|
+
debug_proc(@example) { assert_nil state }
|
86
|
+
end
|
148
87
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
88
|
+
def test_set_histsize_sets_maximum_history_size
|
89
|
+
Setting[:histsize] = 1
|
90
|
+
enter 'set histsize 250'
|
91
|
+
debug_proc(@example)
|
92
|
+
assert_equal 250, Setting[:histsize]
|
93
|
+
check_output_includes "Maximum size of byebug's command history is 250"
|
94
|
+
end
|
154
95
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
end
|
96
|
+
def test_set_histsize_shows_an_error_message_if_no_size_is_provided
|
97
|
+
enter 'set histsize'
|
98
|
+
debug_proc(@example)
|
99
|
+
check_output_includes 'You must specify a value for setting :histsize'
|
160
100
|
end
|
161
101
|
|
162
|
-
|
163
|
-
|
164
|
-
|
102
|
+
def test_set_histfile_sets_command_history_file
|
103
|
+
filename = File.expand_path('.custom-byebug-hist')
|
104
|
+
enter "set histfile #{filename}"
|
105
|
+
debug_proc(@example)
|
106
|
+
assert_equal filename, Setting[:histfile]
|
107
|
+
check_output_includes "The command history file is #{filename}"
|
108
|
+
end
|
165
109
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
end
|
171
|
-
end
|
110
|
+
def test_set_histfile_shows_an_error_message_if_no_filename_is_provided
|
111
|
+
enter 'set histfile'
|
112
|
+
debug_proc(@example)
|
113
|
+
check_output_includes 'You must specify a value for setting :histfile'
|
172
114
|
end
|
173
115
|
|
174
|
-
|
175
|
-
|
176
|
-
|
116
|
+
[:listsize, :width].each do |set|
|
117
|
+
define_method(:"test_set_#{set}_changes_integer_setting_#{set}") do
|
118
|
+
Setting[set] = 80
|
119
|
+
enter "set #{set} 120"
|
177
120
|
debug_proc(@example)
|
178
|
-
|
179
|
-
check_output_includes(/List of settings supported in byebug/)
|
121
|
+
assert_equal 120, Setting[set]
|
180
122
|
end
|
181
123
|
end
|
124
|
+
|
125
|
+
def test_set_without_arguments_shows_help_for_set_command
|
126
|
+
enter 'set'
|
127
|
+
debug_proc(@example)
|
128
|
+
check_output_includes(/Modifies parts of byebug environment./)
|
129
|
+
check_output_includes(/List of settings supported in byebug/)
|
130
|
+
end
|
182
131
|
end
|
183
132
|
end
|
data/test/show_test.rb
CHANGED
@@ -1,97 +1,76 @@
|
|
1
|
-
module
|
2
|
-
class ShowTestCase <
|
3
|
-
|
1
|
+
module Byebug
|
2
|
+
class ShowTestCase < TestCase
|
3
|
+
def setup
|
4
4
|
@example = -> do
|
5
5
|
byebug
|
6
6
|
end
|
7
|
-
end
|
8
|
-
|
9
|
-
[:autoeval, :autolist, :autoreload, :autosave, :basename, :forcestep,
|
10
|
-
:fullpath, :post_mortem, :stack_on_error, :testing, :linetrace,
|
11
|
-
:tracing_plus].each do |setting|
|
12
|
-
describe "showing disabled boolean setting #{setting}" do
|
13
|
-
temporary_change_hash Byebug::Setting, setting, false
|
14
|
-
|
15
|
-
it 'must show default value' do
|
16
|
-
enter "show #{setting}"
|
17
|
-
debug_proc(@example)
|
18
|
-
check_output_includes "#{setting} is off"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
describe "showing enabled boolean setting #{setting}" do
|
23
|
-
temporary_change_hash Byebug::Setting, setting, true
|
24
7
|
|
25
|
-
|
26
|
-
enter "show #{setting}"
|
27
|
-
debug_proc(@example)
|
28
|
-
check_output_includes "#{setting} is on"
|
29
|
-
end
|
30
|
-
end
|
8
|
+
super
|
31
9
|
end
|
32
10
|
|
33
|
-
|
34
|
-
|
35
|
-
|
11
|
+
[:autoeval, :autolist, :autoreload, :autosave, :basename, :forcestep,
|
12
|
+
:fullpath, :post_mortem, :stack_on_error, :testing,
|
13
|
+
:tracing_plus].each do |set|
|
14
|
+
define_method(:"test_show_#{set}_shows_disabled_bool_setting_#{set}") do
|
15
|
+
Setting[set] = false
|
16
|
+
enter "show #{set}"
|
36
17
|
debug_proc(@example)
|
37
|
-
check_output_includes
|
18
|
+
check_output_includes "#{set} is off"
|
38
19
|
end
|
39
|
-
end
|
40
20
|
|
41
|
-
|
42
|
-
|
43
|
-
enter
|
21
|
+
define_method(:"test_show_#{set}_shows_enabled_bool_setting_#{set}") do
|
22
|
+
Setting[set] = true
|
23
|
+
enter "show #{set}"
|
44
24
|
debug_proc(@example)
|
45
|
-
check_output_includes
|
25
|
+
check_output_includes "#{set} is on"
|
46
26
|
end
|
47
27
|
end
|
48
28
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
enter 'show width'
|
54
|
-
debug_proc(@example)
|
55
|
-
check_output_includes "Maximum width of byebug's output is #{cols}"
|
56
|
-
end
|
29
|
+
def test_show_callstyle
|
30
|
+
enter 'show callstyle'
|
31
|
+
debug_proc(@example)
|
32
|
+
check_output_includes "Frame display callstyle is 'long'"
|
57
33
|
end
|
58
34
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
check_output_includes 'Unknown setting :bla'
|
64
|
-
end
|
35
|
+
def test_show_listsize
|
36
|
+
enter 'show listsize'
|
37
|
+
debug_proc(@example)
|
38
|
+
check_output_includes 'Number of source lines to list is 10'
|
65
39
|
end
|
66
40
|
|
67
|
-
|
68
|
-
|
41
|
+
def test_show_width
|
42
|
+
width = Setting[:width]
|
43
|
+
enter 'show width'
|
44
|
+
debug_proc(@example)
|
45
|
+
check_output_includes "Maximum width of byebug's output is #{width}"
|
46
|
+
end
|
69
47
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
end
|
48
|
+
def test_show_unknown_setting
|
49
|
+
enter 'show bla'
|
50
|
+
debug_proc(@example)
|
51
|
+
check_output_includes 'Unknown setting :bla'
|
75
52
|
end
|
76
53
|
|
77
|
-
|
78
|
-
|
54
|
+
def test_show_histfile
|
55
|
+
filename = Setting[:histfile]
|
56
|
+
enter 'show histfile'
|
57
|
+
debug_proc(@example)
|
58
|
+
check_output_includes "The command history file is #{filename}"
|
59
|
+
end
|
79
60
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
61
|
+
def test_show_histsize
|
62
|
+
max_size = Setting[:histsize]
|
63
|
+
enter 'show histsize'
|
64
|
+
debug_proc(@example)
|
65
|
+
check_output_includes \
|
66
|
+
"Maximum size of byebug's command history is #{max_size}"
|
86
67
|
end
|
87
68
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
check_output_includes(/List of settings supported in byebug/)
|
94
|
-
end
|
69
|
+
def test_show_without_arguments_displays_help_for_the_show_command
|
70
|
+
enter 'show'
|
71
|
+
debug_proc(@example)
|
72
|
+
check_output_includes(/Generic command for showing byebug settings./)
|
73
|
+
check_output_includes(/List of settings supported in byebug/)
|
95
74
|
end
|
96
75
|
end
|
97
76
|
end
|