Sha256: 357017452d17dfdb559d66c55de22e9c87c52a71f1354fcd25c5030463734723

Contents?: true

Size: 886 Bytes

Versions: 7

Compression:

Stored size: 886 Bytes

Contents

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

# See that we hande "set trace var" properly
class TestTraceVar < Test::Unit::TestCase

  include FnTestHelper
  include Trace

  def test_basic

    cmds = ['set trace var $my_var', 'continue', 'continue', 'continue']
    d = strarray_setup(cmds)
    d.core.step_events = TEST_STEP_EVENT_MASK

    d.start
    ########### t1 ###############
    x = 1
    $my_var = 5
    y = 2
    $my_var = 6
    z = 3
    ##############################
    d.stop
    out = ['-- ',
           'x = 1',
           'Tracing variable $my_var.',
           '$V ',
           '$my_var = 5',
           'Note: we are stopped *after* the above location.',
           '$V ',
           '$my_var = 6',
           'Note: we are stopped *after* the above location.',
          ]
    compare_output(out, d, cmds)
    end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trepanning-0.1.2 test/functional/test-trace-var.rb
trepanning-0.1.1 test/functional/test-trace-var.rb
trepanning-0.1.0 test/functional/test-trace-var.rb
trepanning-0.0.9 test/functional/test-trace-var.rb
trepanning-0.0.8 test/functional/test-trace-var.rb
trepanning-0.0.6 test/functional/test-trace-var.rb
trepanning-0.0.4 test/functional/test-trace-var.rb