diff options
| author | Masamitsu MURASE <[email protected]> | 2012-06-11 01:39:45 +0900 |
|---|---|---|
| committer | Masamitsu MURASE <[email protected]> | 2012-06-11 01:39:45 +0900 |
| commit | 46c9260305a7acc7ee2e1bd1d2441b56cee89f3f (patch) | |
| tree | 4be5c11f57f080f2714323f6ef1e5c82ee682749 /test | |
| parent | 85901e05469d644e2bb63700fbd1bbc80934dc0d (diff) | |
| download | mruby-46c9260305a7acc7ee2e1bd1d2441b56cee89f3f.tar.gz mruby-46c9260305a7acc7ee2e1bd1d2441b56cee89f3f.zip | |
Add test for slice of shared string.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/string.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index 964ec0e63..d7182fc38 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -256,6 +256,9 @@ assert('String#slice', '15.2.10.5.34') do d1 = 'abc'.slice(0, 0) e1 = 'abc'.slice(1, 2) + # slice of shared string + e11 = e1.slice(0) + # args is RegExp # TODO SEGFAULT ATM @@ -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 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 end |
