Sha256: d8f4c37612d1dd254ee434532790af82e6673f70f59c3cffb0f9abe6061a912e

Contents?: true

Size: 969 Bytes

Versions: 22

Compression:

Stored size: 969 Bytes

Contents

require_relative 'test_helper'

describe "Conditions" do
  include TestDsl
  temporary_change_method_value(Debugger, :printer, Printers::Xml.new)

  describe "setting condition" do
    it "must show a successful message" do
      enter 'break 3', ->{"cond #{breakpoint.id} b == 5"}, "cont"
      id = nil
      debug_file('conditions') { id = breakpoint.id }
      check_output_includes "<conditionSet bp_id=\"#{id}\"/>"
    end
  end

  describe "removing conditions" do
    it "must show a successful message" do
      enter "break 3 if b == 3", "break 4", ->{"cond #{breakpoint.id}"}, "cont"
      id = nil
      debug_file('conditions') { id = breakpoint.id }
      check_output_includes "<conditionSet bp_id=\"#{id}\"/>"
    end
  end

  describe "errors" do
    it "must show error if there are no breakpoints" do
      enter 'cond 1 true'
      debug_file('conditions')
      check_output_includes "<error>No breakpoints have been set</error>"
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
debugger-xml-0.5.0.pre2 test/conditions_test.rb
debugger-xml-0.5.0.pre1 test/conditions_test.rb
debugger-xml-0.4.1 test/conditions_test.rb
debugger-xml-0.4.0 test/conditions_test.rb
debugger-xml-0.3.3 test/conditions_test.rb
debugger-xml-0.3.2 test/conditions_test.rb
debugger-xml-0.3.1 test/conditions_test.rb
debugger-xml-0.2.0 test/conditions_test.rb
debugger-xml-0.1.9 test/conditions_test.rb
debugger-xml-0.1.8 test/conditions_test.rb
debugger-xml-0.1.7 test/conditions_test.rb
debugger-xml-0.1.6 test/conditions_test.rb
debugger-xml-0.1.5 test/conditions_test.rb
debugger-xml-0.1.4 test/conditions_test.rb
debugger-xml-0.1.3 test/conditions_test.rb
debugger-xml-0.1.2 test/conditions_test.rb
debugger-xml-0.1.1 test/conditions_test.rb
debugger-xml-0.1.0 test/conditions_test.rb
debugger-xml-0.0.4 test/conditions_test.rb
debugger-xml-0.0.3 test/conditions_test.rb