?
Unknown Status unknown.
Code
// Test: std/runtime:run is fail-fast by default on parse errors
~import std/runtime
~import std/io
~pub tor ping {}
~proc ping|zig {
}
~std/runtime:register(scope: "api") {
ping(1)
}
const TEST_SOURCE =
\\tor broken
\\| ok
\\ping()
;
~std/runtime:run(source: TEST_SOURCE, scope: "api")
| 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")
Expected output
PARSE ERROR
Flows
flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "api", source: ping(1))
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: TEST_SOURCE, scope: "api")
Test Configuration
MUST_RUN