diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-04 03:04:34 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-04 03:04:34 +0000 |
commit | 2e7c7696334b1b69681cbc0315836fef8e06227d (patch) | |
tree | cb779ab7ebbdbab6e95b0fc3b4fe9f0b101c66c7 /test/ruby/test_backtrace.rb | |
parent | bac9f65f707e8ffcb79389e5b10b32addc94dc01 (diff) | |
download | ruby-2e7c7696334b1b69681cbc0315836fef8e06227d.tar.gz |
* 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
Diffstat (limited to 'test/ruby/test_backtrace.rb')
-rw-r--r-- | test/ruby/test_backtrace.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb index e603c8ad4d..11edd7644f 100644 --- a/test/ruby/test_backtrace.rb +++ b/test/ruby/test_backtrace.rb @@ -86,20 +86,9 @@ class TestBacktrace < Test::Unit::TestCase end def test_caller_locations - locs = caller_locations(0); cs = caller(0).map{|line| - path, lineno, label_str = line.split(':') - 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] + cs = caller(0); locs = caller_locations(0).map{|loc| + loc.to_s } - assert_equal(locs.map{|loc| [loc.path, loc.lineno, loc.label]}, cs) + assert_equal(cs, locs) end end |