✓
Passing This code compiles and runs correctly.
Code
// Test: std/runtime:run returns scope-not-found for missing scopes
~import std/runtime
~import std/io
~pub event greet {}
~proc greet|zig {
}
~std/runtime:register(scope: "exists") {
greet(1)
}
const TEST_SOURCE = "~greet()";
~std/runtime:run(source: TEST_SOURCE, scope: "missing")
| result _ |> std/io:print.ln("OK")
| exhausted _ |> std/io:print.ln("EXHAUSTED")
| parse-error _ |> std/io:print.ln("PARSE ERROR")
| validation-error _ |> std/io:print.ln("VALIDATION ERROR")
| shape-error _ |> std/io:print.ln("SHAPE ERROR")
| event-denied _ |> std/io:print.ln("EVENT DENIED")
| dispatch-error _ |> std/io:print.ln("DISPATCH ERROR")
| scope-not-found _ |> std/io:print.ln("SCOPE NOT FOUND")
Actual
SCOPE NOT FOUND
Expected output
SCOPE NOT FOUND
Test Configuration
MUST_RUN