✗
Failing This test is currently failing.
Failed: frontend
Failure Output
error[PARSE003]: Koru constructs in host-embedded files (`.kz`, `.kjs`, etc.) must start with `~` — the host→Koru switch
--> /Users/larsde/src/orisha/lib/routing.kz:13:1
|
13 | import std/testing
| ^
error[PARSE001]: parse error
--> tests/regression/300_ADVANCED_FEATURES/350_SUBFLOWS/350_013_orisha_router_rejects_terminal/input.kz:11:0 Code
// NEGATIVE TEST — orisha:router must reject TERMINAL (`|`) pattern branches.
//
// The router dispatches INTO the matched route — effect semantics — so its
// pattern branches must be effect branches (`!`). The `[GET /path]` bracket
// syntax is just a branch-name escape, orthogonal to `|`/`!` kind. Orisha
// predates `BranchKind` and was kind-blind, silently accepting `| [pattern]`.
// This pins that the transform is now kind-aware and rejects `|` loudly.
~import orisha
~import std/io
const std = @import("std");
const TestRequest = struct {
method: []const u8,
path: []const u8,
};
const req = TestRequest{ .method = "GET", .path = "/" };
// `|` here is WRONG — these are dispatch handlers, must be `!`.
~orisha:router(req: &req)
| [GET /] |> std/io:print.ln("matched GET /")
| [*] |> std/io:print.ln("catch-all")
Must contain:
orisha:router pattern branches must use effectError Verification
Actual Compiler Output
error[PARSE003]: Koru constructs in host-embedded files (`.kz`, `.kjs`, etc.) must start with `~` — the host→Koru switch
--> /Users/larsde/src/orisha/lib/routing.kz:13:1
|
13 | import std/testing
| ^
error[PARSE001]: parse error
--> tests/regression/300_ADVANCED_FEATURES/350_SUBFLOWS/350_013_orisha_router_rejects_terminal/input.kz:11:0Test Configuration
MUST_FAIL