Skip to content

Fix RegExp.test fancy fallback - #2832

Merged
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2723-regexp-test-fancy
May 30, 2026
Merged

Fix RegExp.test fancy fallback#2832
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2723-regexp-test-fancy

Conversation

@andrewtdiz

Copy link
Copy Markdown
Contributor

Closes #2723

Summary:

  • Route RegExp.prototype.test through the existing fancy_regex fallback cache when the regex crate used the never-matching placeholder.
  • Preserve the existing regex crate path for ordinary patterns.
  • Add focused parity coverage for positive, negative, missing, built, and dynamic lookbehind .test calls, with match/exec controls nearby.

Pre-fix reproduction:

  • env RUSTC_WRAPPER= PATH="/root/.npm/_npx/8758e404b5eed2f3/node_modules/.bin:$PATH" ./run_parity_tests.sh --suite node-suite --module globals --filter regexp-test-lookbehind failed with .test lookbehind returning false while match/exec controls succeeded (test-parity/reports/parity_report_20260530_001928.json).

Validation:

  • PATH="/root/.npm/_npx/8758e404b5eed2f3/node_modules/.bin:$PATH" node test-parity/node-suite/globals/regexp-test-lookbehind.ts
  • env RUSTC_WRAPPER= PATH="/root/.npm/_npx/8758e404b5eed2f3/node_modules/.bin:$PATH" ./run_parity_tests.sh --suite node-suite --module globals --filter regexp-test-lookbehind (PASS; test-parity/reports/parity_report_20260530_002338.json)
  • env RUSTC_WRAPPER= cargo test -p perry-runtime regex
  • env RUSTC_WRAPPER= cargo check -p perry-runtime
  • env RUSTC_WRAPPER= cargo fmt --all -- --check
  • git diff --check
  • jq empty test-parity/known_failures.json test-parity/threshold.json
  • ./scripts/check_file_size.sh

@proggeramlug
proggeramlug merged commit 8785511 into PerryTS:main May 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtime: route RegExp.test through fancy-regex fallback for lookbehind patterns

2 participants