Sha256: b66bf3a37d63d00115d47314b367d56da61c2e7be6ff92c375c4b3440ea5ca84

Contents?: true

Size: 1.17 KB

Versions: 11

Compression:

Stored size: 1.17 KB

Contents

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

# require 'ruby-debug'; Debugger.start

# Test --no-stop and $0 setting.
class TestDollar0 < 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='breakpoints'
    Dir.chdir(@@SRC_DIR) do
      home_save = ENV['HOME']
      ENV['HOME'] = '.'
      filter = Proc.new{|got_lines, correct_lines|
        [got_lines, correct_lines].flatten.each do |s|
          s.gsub!(/.*dollar-0.rb$/, 'dollar-0.rb')
        end
      }

      assert_equal(true,
                   run_debugger('dollar-0',
                                '-nx --no-stop ./dollar-0.rb',
                                nil, filter, false, '../bin/rdebug'))
      # Ruby's __FILE__ seems to prepend ./ when no directory was added.
      assert_equal(true,
                   run_debugger('dollar-0b',
                                '-nx --no-stop ' +
                                File.join('..', 'test', 'dollar-0.rb'),
                                nil, filter, false, '../bin/rdebug'))
      ENV['HOME'] = home_save
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
debugger-1.2.4 test/test-dollar-0.rb
debugger-1.2.3 test/test-dollar-0.rb
debugger-1.2.2 test/test-dollar-0.rb
debugger-1.2.1 test/test-dollar-0.rb
debugger-1.2.0 test/test-dollar-0.rb
debugger-1.1.4 test/test-dollar-0.rb
debugger-1.1.3 test/test-dollar-0.rb
debugger-1.1.2 test/test-dollar-0.rb
debugger-1.1.1 test/test-dollar-0.rb
debugger-1.1.0 test/test-dollar-0.rb
debugger-1.0.1 test/test-dollar-0.rb