Sha256: 87481392e54dc92b0a145d0bc7e92c5f48b169878c6fab90c8313ee672364a83

Contents?: true

Size: 841 Bytes

Versions: 2

Compression:

Stored size: 841 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require_relative 'helper'
require 'rbconfig'

class TestTrace < Test::Unit::TestCase
  @@NAME = File.basename(__FILE__, '.rb')[5..-1]
  TREPAN_LOC =
    if RbConfig::CONFIG['target_os'].start_with?('mingw')
      /.. \((?:[A-Za-z]:)?.+:\d+( @\d+)?\)/
    else
      /.. \(.+:\d+( @\d+)?\)/
    end

    def test_trepan_trace
        opts = {:dbgr => '-x --basename', :args => '3 5', :nocommand => true}
        if RbConfig::CONFIG['target_os'].start_with?('mingw')
            opts[:short_right] = 'trace-mingw'
        end
        opts[:filter] = Proc.new{|got_lines, correct_lines|
            got_lines.each do |line|
                line.gsub!(/\(address 0x[0-9a-f]+ /, '(address 0xdeadbeef ')
            end
        }
        assert_equal(true, run_debugger(@@NAME, 'gcd.rb', opts))
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trepanning-1.93.35 test/integration/test-trace.rb
trepanning-1.93.32 test/integration/test-trace.rb