Source code

Revision control

Copy as Markdown

Other Tools

// Copyright 2025 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
author: Mathias Bynens
description: >
Unicode property escapes for `Script=Tai_Yo`
info: |
Unicode v17.0.0
esid: sec-static-semantics-unicodematchproperty-p
features: [regexp-unicode-property-escapes]
includes: [regExpUtils.js]
---*/
const matchSymbols = buildString({
loneCodePoints: [],
ranges: [
[0x01E6C0, 0x01E6DE],
[0x01E6E0, 0x01E6F5],
[0x01E6FE, 0x01E6FF]
]
});
testPropertyEscapes(
/^\p{Script=Tai_Yo}+$/u,
matchSymbols,
"\\p{Script=Tai_Yo}"
);
testPropertyEscapes(
/^\p{Script=Tayo}+$/u,
matchSymbols,
"\\p{Script=Tayo}"
);
testPropertyEscapes(
/^\p{sc=Tai_Yo}+$/u,
matchSymbols,
"\\p{sc=Tai_Yo}"
);
testPropertyEscapes(
/^\p{sc=Tayo}+$/u,
matchSymbols,
"\\p{sc=Tayo}"
);
const nonMatchSymbols = buildString({
loneCodePoints: [
0x01E6DF
],
ranges: [
[0x00DC00, 0x00DFFF],
[0x000000, 0x00DBFF],
[0x00E000, 0x01E6BF],
[0x01E6F6, 0x01E6FD],
[0x01E700, 0x10FFFF]
]
});
testPropertyEscapes(
/^\P{Script=Tai_Yo}+$/u,
nonMatchSymbols,
"\\P{Script=Tai_Yo}"
);
testPropertyEscapes(
/^\P{Script=Tayo}+$/u,
nonMatchSymbols,
"\\P{Script=Tayo}"
);
testPropertyEscapes(
/^\P{sc=Tai_Yo}+$/u,
nonMatchSymbols,
"\\P{sc=Tai_Yo}"
);
testPropertyEscapes(
/^\P{sc=Tayo}+$/u,
nonMatchSymbols,
"\\P{sc=Tayo}"
);
reportCompare(0, 0);