Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/debug/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ def config_command arg
config_set $1, $2, append: true

when /\A\s*append\s+(\w+)\s+(.+)\z/
config_set $1, $2
config_set $1, $2, append: true

when /\A(\w+)\z/
config_show $1
Expand Down
31 changes: 31 additions & 0 deletions test/console/config_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,37 @@ def test_skip_path_skip_catch_breakpoint
end
end

class ConfigSetAppend < ConsoleTestCase
def program
<<~RUBY
1| a = 1
RUBY
end

def test_set_append
debug_code program do
type 'config set skip_path foo'
assert_line_text(/foo/)

type 'config set skip_path bar'
assert_no_line_text(/foo/)
assert_line_text(/bar/)

type 'config skip_path = foo'
assert_no_line_text(/bar/)
assert_line_text(/foo/)

type 'config append skip_path bar'
assert_line_text(/foo.+bar/)

type 'config skip_path << baz'
assert_line_text(/foo.+bar.+baz/)

type 'c'
end
end
end

class ConfigKeepAllocSiteTest < ConsoleTestCase
def program
<<~RUBY
Expand Down