Sha256: c7c59f638e485adf24d27b1111cf28ed788772b230575cbb08af8dc69674a1ad

Contents?: true

Size: 967 Bytes

Versions: 1

Compression:

Stored size: 967 Bytes

Contents

#!/usr/bin/env ruby
require File.expand_path("../helper", __FILE__)

# Test info variables command
class TestInfoVar < Test::Unit::TestCase
  include TestHelper

  def test_info_variables
    filter = Proc.new{|got_lines, correct_lines|
      [got_lines[13-1], correct_lines[13-1]].each do |s|
        s.sub!(/Mine:0x[0-9,a-f]+/, 'Mine:')
      end
      [got_lines, correct_lines].each do |a|
        a.each do |s|
          s.sub!(/Lousy_inspect:0x[0-9,a-f]+/, 'Lousy_inspect:')
          s.sub!(/UnsuspectingClass:0x[0-9,a-f]+/, 'UnsuspectingClass:')
        end
      end
    }

    testname='info-var'
    script = File.join('data', testname + '.cmd')
    assert(run_debugger(testname, "--script #{script} -- ./example/info-var-bug.rb",
                        :filter => filter))
    
    testname='info-var-bug2'
    script = File.join('data', testname + '.cmd')
    assert(run_debugger(testname, "--script #{script} -- ./example/info-var-bug2.rb"))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-debug-0.10.5.rc1 test/test-info-var.rb