feat: add multi-engine regex flavour support

This commit is contained in:
2026-07-27 11:43:51 +02:00
parent 7079cde15f
commit 7f3a91ad37
340 changed files with 643286 additions and 483 deletions

View File

@@ -234,6 +234,26 @@ afterEach(() => {
});
describe("Workbench syntax coordination", () => {
it("exposes enumerated engine options and forwards the selected C++ grammar", async () => {
vi.useFakeTimers();
render(<Workbench />);
fireEvent.change(screen.getByRole("combobox", { name: "Flavour" }), {
target: { value: "cpp" },
});
const grammar = screen.getByRole("combobox", { name: "Grammar" });
expect(grammar).toHaveValue("ECMAScript");
fireEvent.change(grammar, { target: { value: "extended" } });
await advanceParseDebounce();
expect(syntaxHarness.patterns.at(-1)?.request).toMatchObject({
flavour: "cpp",
flags: ["g"],
options: { grammar: "extended" },
});
});
it("blocks Run until current syntax arrives and isolates replacement parsing", async () => {
vi.useFakeTimers();
render(<Workbench />);