Sha256: 58b5280b5720fd5eedf8597934ccf950d72741e5f0a9493224208943afa03ad9

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

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

class TestDebuggerStop < Test::Unit::TestCase
  @@name = File.basename(__FILE__, '.rb')[5..-1]
  @@name = @@name[2..-1] if 
    (RbConfig::CONFIG['target_os'].start_with?('mingw') and
     @@name =~ /^[A-Za-z]:/)

  def test_it
    skip "FIXME for mingw" if 
      RbConfig::CONFIG['target_os'].start_with?('mingw') 
    opts = {}
    opts[:feed_input] = "echo 'info program ;; continue ;; quit!' "
    opts[:filter] = Proc.new{|got_lines, correct_lines|
      got_lines[0].gsub!(/\(.*debugger-stop.rb[:]\d+ @\d+/, 
                         'debugger-stop.rb:14 @1955')
      # require_relative '../../lib/trepanning'; debugger
      got_lines[2].gsub!(/PC offset \d+ .*<top .+debugger-stop.rb/, 
                         "PC offset 100 <top debugger-stop.rb")
      got_lines[3].gsub!(/\(.*debugger-stop.rb[:]\d+ @\d+/, 
                         'debugger-stop.rb:10 @1954')
    }
    assert_equal(true, run_debugger(@@name, @@name + '.rb', opts))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trepanning-1.93.35 test/integration/test-debugger-stop.rb
trepanning-1.93.32 test/integration/test-debugger-stop.rb