1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_backtrace.rb: fix test.

Windows path includes `:' character.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2012-06-04 03:04:34 +00:00
parent bac9f65f70
commit 2e7c769633
2 changed files with 8 additions and 14 deletions

View file

@ -1,3 +1,8 @@
Mon Jun 4 12:01:21 2012 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_backtrace.rb: fix test.
Windows path includes `:' character.
Mon Jun 4 11:42:39 2012 Koichi Sasada <ko1@atdot.net> Mon Jun 4 11:42:39 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h (rb_location_t): fix type and field name. * vm_core.h (rb_location_t): fix type and field name.

View file

@ -86,20 +86,9 @@ class TestBacktrace < Test::Unit::TestCase
end end
def test_caller_locations def test_caller_locations
locs = caller_locations(0); cs = caller(0).map{|line| cs = caller(0); locs = caller_locations(0).map{|loc|
path, lineno, label_str = line.split(':') loc.to_s
unless label_str
label_str = lineno
lineno = 0
end
lineno = lineno.to_i
if /in `(.+?)\'/ =~ label_str
label = $1
else
label = nil
end
[path, lineno, label]
} }
assert_equal(locs.map{|loc| [loc.path, loc.lineno, loc.label]}, cs) assert_equal(cs, locs)
end end
end end