| Index: test/webkit/fast/js/regexp-lastindex.js
|
| diff --git a/test/webkit/array-constructor-host-call.js b/test/webkit/fast/js/regexp-lastindex.js
|
| similarity index 74%
|
| copy from test/webkit/array-constructor-host-call.js
|
| copy to test/webkit/fast/js/regexp-lastindex.js
|
| index 50d6489cafd0716dd5cbbe0f9da8a958d9f61ca6..0c939f0ed5cb94f680e778128ffbbcd0fa20090d 100644
|
| --- a/test/webkit/array-constructor-host-call.js
|
| +++ b/test/webkit/fast/js/regexp-lastindex.js
|
| @@ -22,15 +22,14 @@
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| description(
|
| -"This tests that array construction via a host call works."
|
| +'Test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=5602">REGRESSION: RegExp("[^\\s$]+", "g") returns extra matches</a>'
|
| );
|
|
|
| -function constructArray(arrayConstructor) {
|
| - return new arrayConstructor(100);
|
| -}
|
| +var re = new RegExp("[^\\s$]+", "g");
|
| +var accumulate = "";
|
| +var match;
|
| +shouldBe('while (match = re.exec(" abcdefg")) accumulate += match + "; "; accumulate', '"abcdefg; "');
|
|
|
| -for (var i = 0; i < 3; ++i) {
|
| - var array = constructArray(Array);
|
| - shouldBeTrue("array instanceof Array");
|
| - shouldBe("array.length", "100");
|
| -}
|
| +var re = new RegExp(/\d/g);
|
| +accumulate = "";
|
| +shouldBe('while (match = re.exec("123456789")) accumulate += match + "; "; accumulate', '"1; 2; 3; 4; 5; 6; 7; 8; 9; "');
|
|
|