Sha256: ef5505e10c4eb1393977c35aea49390cbcb241c0b802faa0dd5caa08cb63cda2

Contents?: true

Size: 933 Bytes

Versions: 3

Compression:

Stored size: 933 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'

# require 'rubygems'
# require 'ruby-debug'; Debugger.start

# Test finish command
class TestFinish < Test::Unit::TestCase

  @@src_dir = File.join(Dir.pwd, File.dirname(__FILE__)) unless
    defined?(@@src_dir)

  require File.join(@@src_dir, 'helper')
  include TestHelper

  def test_basic
    testname='finish'
    # Ruby 1.8.6 and earlier have a trace-line number bug for return
    # statements.
#     filter = Proc.new{|got_lines, correct_lines|
#       [got_lines[31], got_lines[34]].flatten.each do |s|
#         s.sub!(/gcd.rb:\d+/, 'gcd.rb:13')
#       end
#       got_lines[32] = 'return a'
#     }
    Dir.chdir(@@src_dir) do 
      script = File.join('data', testname + '.cmd')
      assert_equal(true, 
                   run_debugger(testname,
                                "--script #{script} -- ./gcd.rb 3 5", 
                                nil, nil))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
debugger-1.0.0 test/test-finish.rb
debugger-1.0.0.rc2 test/test-finish.rb
debugger-1.0.0.rc1 test/test-finish.rb