non-unicode-malformed-lookbehind.js (491B)
1 // Copyright 2017 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: prod-GroupSpecifier 6 description: > 7 \k is parsed as IdentityEscape as look-behind assertion is not a GroupName. 8 features: [regexp-named-groups, regexp-lookbehind] 9 ---*/ 10 11 assert(/\k<a>(?<=>)a/.test("k<a>a")); 12 assert(/(?<=>)\k<a>/.test(">k<a>")); 13 14 assert(/\k<a>(?<!a)a/.test("k<a>a")); 15 assert(/(?<!a>)\k<a>/.test("k<a>")); 16 17 reportCompare(0, 0);