| Index: test/webkit/fast/js/regexp-non-greedy-parentheses.js
|
| diff --git a/test/webkit/array-iterate-backwards.js b/test/webkit/fast/js/regexp-non-greedy-parentheses.js
|
| similarity index 69%
|
| copy from test/webkit/array-iterate-backwards.js
|
| copy to test/webkit/fast/js/regexp-non-greedy-parentheses.js
|
| index 301cbd5290c9dfafcf44c22b351483aa219212f3..48f19f3a0d8f37c07cc5eca6796aee6fe02475b4 100644
|
| --- a/test/webkit/array-iterate-backwards.js
|
| +++ b/test/webkit/fast/js/regexp-non-greedy-parentheses.js
|
| @@ -22,34 +22,14 @@
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| description(
|
| -"This test checks that iterating a large array backwards works correctly."
|
| +'Test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=39289">Wrong result in case of non-iterative matching of subpatterns in non-greedy cases in YARR Interpreter</a>'
|
| );
|
|
|
| -var bytes = new Array();
|
| -
|
| -function prepare(nbytes) {
|
| - var i = nbytes - 1;
|
| - while (i >= 0) {
|
| - bytes[i] = new Number(i);
|
| - i -= 1;
|
| - }
|
| -}
|
| -
|
| -function verify(nbytes) {
|
| - var i = nbytes - 1;
|
| - while (i >= 0) {
|
| - if (bytes[i] != i)
|
| - return false;
|
| - i -= 1;
|
| - }
|
| - return true;
|
| -}
|
| -
|
| -prepare(32768);
|
| -shouldBeTrue('verify(32768)');
|
| -
|
| -prepare(65536);
|
| -shouldBeTrue('verify(65536)');
|
| -
|
| -prepare(120000);
|
| -shouldBeTrue('verify(120000)');
|
| +shouldBe('"a".match(/(a)??/)', '["", undefined]');
|
| +shouldBe('"b".match(/(a)??/)', '["", undefined]');
|
| +shouldBe('"ab".match(/(a)??b/)', '["ab", "a"]');
|
| +shouldBe('"aaab".match(/(a+)??b/)', '["aaab", "aaa"]');
|
| +shouldBe('"abbc".match(/(a)??(b+)??c/)', '["abbc", "a", "bb"]');
|
| +shouldBe('"ac".match(/(a)??(b)??c/)', '["ac", "a", undefined]');
|
| +shouldBe('"abc".match(/(a(b)??)??c/)', '["abc", "ab", "b"]');
|
| +shouldBe('"ac".match(/(a(b)??)??c/)', '["ac", "a", undefined]');
|
|
|