Skip to content

Commit

Permalink
Remove continue_breakpoint and change continue_always to \'continue\'!
Browse files Browse the repository at this point in the history
  • Loading branch information
renatocassino committed Jan 3, 2019
1 parent 453afc2 commit 60f71d7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 124 deletions.
1 change: 1 addition & 0 deletions lib/byebug/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require "byebug/commands/catch"
require "byebug/commands/condition"
require "byebug/commands/continue"
require "byebug/commands/continue_always"
require "byebug/commands/debug"
require "byebug/commands/delete"
require "byebug/commands/disable"
Expand Down
12 changes: 7 additions & 5 deletions lib/byebug/commands/continue_always.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'byebug/command'
require 'byebug/helpers/parse'
# frozen_string_literal: true

require "byebug/command"
require "byebug/helpers/parse"

module Byebug
#
Expand All @@ -12,18 +14,18 @@ class ContinueAlwaysCommand < Command
include Helpers::ParseHelper

def self.regexp
/^\s* c(?:ont(?:inue)?_)?(?:a(?:lways)?) \s*$/x
/^\s* c(?:ont(?:inue)?)?\! \s*$/x
end

def self.description
<<-DESCRIPTION
c[ont[inue]_]a[lways]
c[ont[inue]_]!
#{short_description}
DESCRIPTION
end

def self.short_description
'Runs the command and ignore all next breakpoints'
"Runs the command and ignore all next breakpoints"
end

def execute
Expand Down
70 changes: 0 additions & 70 deletions lib/byebug/commands/continue_breakpoint.rb

This file was deleted.

12 changes: 7 additions & 5 deletions test/commands/continue_always_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'test_helper'

module Byebug
Expand All @@ -13,9 +15,9 @@ def program
4: #
5: class #{example_class}
6: def factor(num)
7: i=1
7: i = 1
8: num.times do |new_number|
9: i*= new_number
9: i *= new_number
10: byebug
11: end
12: end
Expand All @@ -35,21 +37,21 @@ def reset_commands
end

def test_continues_and_never_stop_again
enter 'continue_always'
enter "continue!"

debug_code(program) { assert_program_finished }
reset_commands
end

def test_continues_and_never_stop_using_abbreviation
enter 'ca'
enter "c!"

debug_code(program) { assert_program_finished }
reset_commands
end

def test_continues_and_never_stop_using_another_abbreviation
enter 'cont_always'
enter "cont!"

debug_code(program) { assert_program_finished }
reset_commands
Expand Down
44 changes: 0 additions & 44 deletions test/commands/continue_breakpoint_test.rb

This file was deleted.

0 comments on commit 60f71d7

Please sign in to comment.