Commit 46c92603 authored by Masamitsu MURASE's avatar Masamitsu MURASE

Add test for slice of shared string.

parent 85901e05
...@@ -256,6 +256,9 @@ assert('String#slice', '15.2.10.5.34') do ...@@ -256,6 +256,9 @@ assert('String#slice', '15.2.10.5.34') do
d1 = 'abc'.slice(0, 0) d1 = 'abc'.slice(0, 0)
e1 = 'abc'.slice(1, 2) e1 = 'abc'.slice(1, 2)
# slice of shared string
e11 = e1.slice(0)
# args is RegExp # args is RegExp
# TODO SEGFAULT ATM # TODO SEGFAULT ATM
...@@ -265,7 +268,7 @@ assert('String#slice', '15.2.10.5.34') do ...@@ -265,7 +268,7 @@ assert('String#slice', '15.2.10.5.34') do
a == 'a' and b == 'c' and c == nil and d == nil and a == 'a' and b == 'c' and c == nil and d == nil and
a1 == nil and b1 == nil and c1 == nil and d1 == '' and a1 == nil and b1 == nil and c1 == nil and d1 == '' and
e1 == 'bc' and e1 == 'bc' and e11 == 'b' and
a3 == 'bc' and b3 == nil a3 == 'bc' and b3 == nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment