Sha256: 4899cffcfe252db19c9dccaf8baadbfcf81866595bb7bd098610596218018014

Contents?: true

Size: 877 Bytes

Versions: 1

Compression:

Stored size: 877 Bytes

Contents

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

# Test frame commands
class TestFrame < Test::Unit::TestCase
  include TestHelper

  # Test commands in frame.rb
  def test_basic
    testname='frame'
    script = File.join('data', testname + '.cmd')
    assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5"))
  end

  def test_bad_continue
    # Remove absolute paths in output.
    filter = Proc.new{|got_lines, correct_lines|
      [got_lines, correct_lines].flatten.each do |s|
        s.sub!(/in file ".*gcd.rb/, 'in file "gcd.rb')
      end
    }

    testname='continue_bad'
    script = File.join('data', testname + '.cmd')
    assert(run_debugger(testname, "--script #{script} -- ./example/gcd.rb 3 5",
                        :filter => filter))
  end unless defined?(JRUBY_VERSION) # JRuby doesn't yet support tracelines
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-debug-0.10.5.rc1 test/test-frame.rb