LibRegex: Treat the UnicodeSets flag as Unicode

Fixes /.../v not being interpreted as a unicode pattern.
This commit is contained in:
Ali Mohammad Pur 2025-02-28 12:29:44 +01:00 committed by Tim Flynn
commit ea3b7efd91
Notes: github-actions[bot] 2025-02-28 19:32:42 +00:00
3 changed files with 7 additions and 2 deletions

View file

@ -72,3 +72,8 @@ test("regexp that always matches stops matching if it's past the end of the stri
expect("whf".match(re)).toEqual(["", "", "", ""]);
expect(re.lastIndex).toBe(0);
});
test("v flag should enable unicode mode", () => {
const re = new RegExp("a\\u{10FFFF}", "v");
expect(re.test("a\u{10FFFF}")).toBe(true);
});