diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/dependentStrings.js')
-rw-r--r-- | js/src/jit-test/tests/basic/dependentStrings.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/dependentStrings.js b/js/src/jit-test/tests/basic/dependentStrings.js new file mode 100644 index 0000000000..1dd38bbacb --- /dev/null +++ b/js/src/jit-test/tests/basic/dependentStrings.js @@ -0,0 +1,11 @@ +function dependentStrings() +{ + var a = []; + var t = "abcdefghijklmnopqrst"; + for (var i = 0; i < 10; i++) { + var s = t.substring(2*i, 2*i + 2); + a[i] = s + s.length; + } + return a.join(""); +} +assertEq(dependentStrings(), "ab2cd2ef2gh2ij2kl2mn2op2qr2st2"); |