mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix typo in lldb script
Also fix tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
714c2b0a93
commit
ad67845ba8
2 changed files with 7 additions and 3 deletions
|
@ -197,7 +197,7 @@ def lldb_inspect(debugger, target, result, val):
|
||||||
if not imag.startswith("-"):
|
if not imag.startswith("-"):
|
||||||
imag = "+" + imag
|
imag = "+" + imag
|
||||||
print >> result, "(Complex) " + real + imag + "i"
|
print >> result, "(Complex) " + real + imag + "i"
|
||||||
elif flType == RUBY_T_REGEX:
|
elif flType == RUBY_T_REGEXP:
|
||||||
tRRegex = target.FindFirstType("struct RRegexp").GetPointerType()
|
tRRegex = target.FindFirstType("struct RRegexp").GetPointerType()
|
||||||
val = val.Cast(tRRegex)
|
val = val.Cast(tRRegex)
|
||||||
print >> result, "(Regex)"
|
print >> result, "(Regex)"
|
||||||
|
|
|
@ -9,7 +9,7 @@ class TestLLDBInit < Test::Unit::TestCase
|
||||||
tf.puts <<eom
|
tf.puts <<eom
|
||||||
target create ./miniruby
|
target create ./miniruby
|
||||||
command script import -r misc/lldb_cruby.py
|
command script import -r misc/lldb_cruby.py
|
||||||
b rb_p
|
b rb_inspect
|
||||||
run -e'p #{expr}'
|
run -e'p #{expr}'
|
||||||
rp obj
|
rp obj
|
||||||
eom
|
eom
|
||||||
|
@ -24,8 +24,12 @@ eom
|
||||||
assert_rp 'Object.new', 'T_OBJECT'
|
assert_rp 'Object.new', 'T_OBJECT'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_rp_regex
|
||||||
|
assert_rp '/foo/', '[(]Regex'
|
||||||
|
end
|
||||||
|
|
||||||
def test_rp_symbol
|
def test_rp_symbol
|
||||||
assert_rp ':abcde', /immediate\(\h+\)/
|
assert_rp ':abcde', /T_SYMBOL: \(\h+\)/
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rp_string
|
def test_rp_string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue