Skip to content

Commit

Permalink
Reflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Feb 6, 2015
1 parent 8c084c2 commit 6d76f6d
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions test/integration/test-trace.rb
Expand Up @@ -5,23 +5,24 @@

class TestTrace < Test::Unit::TestCase
@@NAME = File.basename(__FILE__, '.rb')[5..-1]
TREPAN_LOC =
TREPAN_LOC =
if RbConfig::CONFIG['target_os'].start_with?('mingw')
/.. \((?:[A-Za-z]:)?.+:\d+( @\d+)?\)/
else
/.. \(.+:\d+( @\d+)?\)/
end

def test_trepan_trace
opts = {:dbgr => '-x', :args => '3 5', :nocommand => true}
if RbConfig::CONFIG['target_os'].start_with?('mingw')
opts[:short_right] = 'trace-mingw'
def test_trepan_trace
opts = {:dbgr => '-x', :args => '3 5', :nocommand => true}
if RbConfig::CONFIG['target_os'].start_with?('mingw')
opts[:short_right] = 'trace-mingw'
end
opts[:filter] = Proc.new{|got_lines, correct_lines|
got_lines.each do |line|
line.gsub!(/\((?:.*\/)?(.+:\d+) @/, '(\1 @') if
line =~ TREPAN_LOC
end
}
assert_equal(true, run_debugger(@@NAME, 'gcd.rb', opts))
end
opts[:filter] = Proc.new{|got_lines, correct_lines|
got_lines.each do |line|
line.gsub!(/\((?:.*\/)?(.+:\d+) @/, '(\1 @') if line =~ TREPAN_LOC
end
}
assert_equal(true, run_debugger(@@NAME, 'gcd.rb', opts))
end
end

0 comments on commit 6d76f6d

Please sign in to comment.