| Index: test/mjsunit/es6/regexp-sticky.js
|
| diff --git a/test/mjsunit/es6/regexp-sticky.js b/test/mjsunit/es6/regexp-sticky.js
|
| index c0633f9173eb645a71b1718fbae6dabc1b7af9ab..df39763694334b97eb6141232d1a9529c4d8238c 100644
|
| --- a/test/mjsunit/es6/regexp-sticky.js
|
| +++ b/test/mjsunit/es6/regexp-sticky.js
|
| @@ -128,3 +128,10 @@ mhat.lastIndex = 2;
|
| assertFalse(mhat.test("..foo"));
|
| mhat.lastIndex = 2;
|
| assertTrue(mhat.test(".\nfoo"));
|
| +
|
| +// Check that we don't apply incorrect optimization to sticky regexps that
|
| +// are anchored at end.
|
| +var stickyanchored = /bar$/y;
|
| +assertFalse(stickyanchored.test("foobar"));
|
| +stickyanchored.lastIndex = 3;
|
| +assertTrue(stickyanchored.test("foobar"));
|
|
|