Sha256: 205526504a957e31fd2ac96783a87a22a201ff77b3b664b88bf2f612e198e650

Contents?: true

Size: 1.54 KB

Versions: 4

Compression:

Stored size: 1.54 KB

Contents

#!/usr/bin/env ruby
require 'test/unit'
require 'rubygems'; require 'require_relative'
require_relative 'fn_helper'

class TestBreak < Test::Unit::TestCase

  include FnTestHelper

  def test_list_frame_change
    # Check that list update the frame position
    # of sibling returns. We have one more 'continue' than we need
    # just in case something goes wrong.
    cmds_pat = [
                'set max list 2',
                'list', 
                "continue %d", 
                'list',
                'up',
                'list', 
                'continue'].join("\n")
    line = __LINE__
    cmds = (cmds_pat % (line+5)).split(/\n/)
    d = strarray_setup(cmds)
    ##############################
    def foo      # line +  4  
      a = 5      # line +  5
      b = 6      # line +  6
    end          # line +  7
    d.start      # line +  8
    foo
    ##############################
    d.stop # ({:remove => true})
    out = [
           "-- ",
           "foo",
           "max list is 2.",
           " 31  ->\t    foo",
           " 32    \t    ##############################",
           "Set temporary breakpoint 1: foo.rb:55 (@3)",
           "x1 ",
           "a = 5      # line +  5",
           " 27  ->\t      a = 5      # line +  5",
           " 28    \t      b = 6      # line +  6",
           "--> #1 TestBreak#test_list_frame_change at test-list.rb:31",
           "   ",
           "foo",
           " 31  ->\t    foo",
           " 32    \t    ##############################"
          ]
    compare_output(out, d, cmds)
  end

end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 test/functional/test-list.rb
rbx-trepanning-0.2.1-universal-rubinius-1.2 test/functional/test-list.rb
rbx-trepanning-0.2.0-universal-rubinius-2.0 test/functional/test-list.rb
rbx-trepanning-0.1.0-universal-rubinius-1.2 test/functional/test-list.rb