String#split is buggy
https://bugs.webkit.org/show_bug.cgi?id=68348
Reviewed by Sam Weinig.
Source/JavaScriptCore:
* runtime/StringPrototype.cpp:
(JSC::jsStringWithReuse):
- added helper function to reuse original JSString value.
(JSC::stringProtoFuncSplit):
- Rewritten from the spec.
* tests/mozilla/ecma/String/15.5.4.8-2.js:
(getTestCases):
- This test is not ES5 compliant.
LayoutTests:
* fast/js/script-tests/string-split-conformance.js: Added.
* fast/js/string-split-conformance-expected.txt: Added.
* fast/js/string-split-conformance.html: Added.
- Added new Layout test based on:
http://stevenlevithan.com/demo/split.cfm
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T6-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T8-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T9-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A2_T7-expected.txt:
- Check in failing results for these 5 tests; they are all wrong
(see https://bugs.ecmascript.org/show_bug.cgi?id=61).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95504
268f45cc-cd09-0410-ab3c-
d52691b4dbfc