ladybird/Tests/LibJS/Runtime/syntax
Andreas Kling e0de4ef33e LibRegex: Reject negated /v classes that contain strings
Negated unicode-set classes are only valid when every member is
single-code-point. We already rejected direct string-valued members
such as `q{ab}` and `p{RGI_Emoji_Flag_Sequence}` inside `[^...]`,
but nested class-set operands could still smuggle them through, so
patterns like `[^[[p{Emoji_Keycap_Sequence}]]]` and the reported
fuzzed literal compiled instead of throwing.

Validate nested class-set expressions after parsing and reject only the
negated `/v` classes whose resulting multi-code-point strings are still
non-empty. Track the exact string members contributed by string
literals, string properties, and nested classes so intersections and
subtractions can eliminate them before the negated-class check runs.

Add constructor and literal coverage for the reduced nested-string
cases, the original regression, and valid negated set operations that
remove every string member.
2026-03-31 15:59:04 +02:00
..
async-await.js LibJS: Synchronous await fast path when microtask queue is empty 2026-03-16 19:15:03 -05:00
async-generators.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
coalesce-logic-expression-mixing.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
destructuring-assignment.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
dynamic-import-usage.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
for-loop-invalid-in.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
function-hoisting.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
functions-in-tree-order-non-strict.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
functions-in-tree-order-strict.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
generators.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
if-statement-empty-completion.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
new-with-optional-chaining.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
numeric-separator.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
optional-chaining.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
regex-literal-errors.js LibRegex: Reject negated /v classes that contain strings 2026-03-31 15:59:04 +02:00
return-object-with-duplicated-field-names-from-arrow-function.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
slash-after-block.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
switch-as-statement.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
syntax-error-unary-expression-before-exponentiation.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00