| Index: test/webkit/fast/regex/quantified-assertions.js
|
| diff --git a/test/webkit/array-iterate-backwards.js b/test/webkit/fast/regex/quantified-assertions.js
|
| similarity index 70%
|
| copy from test/webkit/array-iterate-backwards.js
|
| copy to test/webkit/fast/regex/quantified-assertions.js
|
| index 301cbd5290c9dfafcf44c22b351483aa219212f3..966ca3258eca8ea1f157c7f79245254e82ea323e 100644
|
| --- a/test/webkit/array-iterate-backwards.js
|
| +++ b/test/webkit/fast/regex/quantified-assertions.js
|
| @@ -22,34 +22,29 @@
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| description(
|
| -"This test checks that iterating a large array backwards works correctly."
|
| +"This page tests assertions followed by quantifiers."
|
| );
|
|
|
| -var bytes = new Array();
|
| +var regexp;
|
|
|
| -function prepare(nbytes) {
|
| - var i = nbytes - 1;
|
| - while (i >= 0) {
|
| - bytes[i] = new Number(i);
|
| - i -= 1;
|
| - }
|
| -}
|
| +regexp = /(?=a){0}/gm;
|
| +debug("\nTesting regexp: " + regexp);
|
| +shouldBeTrue("regexp.test('a')");
|
| +shouldBe("regexp.lastIndex", "0");
|
|
|
| -function verify(nbytes) {
|
| - var i = nbytes - 1;
|
| - while (i >= 0) {
|
| - if (bytes[i] != i)
|
| - return false;
|
| - i -= 1;
|
| - }
|
| - return true;
|
| -}
|
| +regexp = /(?=a){1}/gm;
|
| +debug("\nTesting regexp: " + regexp);
|
| +shouldBeTrue("regexp.test('a')");
|
| +shouldBe("regexp.lastIndex", "0");
|
|
|
| -prepare(32768);
|
| -shouldBeTrue('verify(32768)');
|
| +regexp = /(?!a){0}/gm;
|
| +debug("\nTesting regexp: " + regexp);
|
| +shouldBeTrue("regexp.test('b')");
|
| +shouldBe("regexp.lastIndex", "0");
|
|
|
| -prepare(65536);
|
| -shouldBeTrue('verify(65536)');
|
| +regexp = /(?!a){1}/gm;
|
| +debug("\nTesting regexp: " + regexp);
|
| +shouldBeTrue("regexp.test('b')");
|
| +shouldBe("regexp.lastIndex", "0");
|
|
|
| -prepare(120000);
|
| -shouldBeTrue('verify(120000)');
|
| +shouldBeTrue('/^(?=a)?b$/.test("b")');
|
|
|