Sha256: af6e8eb905f8de8f428ea13a705c5c8093b5e4ac971282ac78df1ace265ac46c

Contents?: true

Size: 1.48 KB

Versions: 11

Compression:

Stored size: 1.48 KB

Contents

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

# begin require 'rubygems' rescue LoadError end
# require 'ruby-debug'; Debugger.start

# Test --no-stop and $0 setting.
class TestDollar0 < Test::Unit::TestCase
  
  @@SRC_DIR = 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-0a', 
                                '-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 & 4 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb
ruby-debug-0.10.4 test/test-dollar-0.rb
rackjour-0.1.8 vendor/gems/gems/ruby-debug-0.10.3/test/test-dollar-0.rb
ruby-debug-0.10.3 test/test-dollar-0.rb