✓
Passing This code compiles and runs correctly.
Code
// Test: Basic args access
~import std/args
~import std/io
// Get argument count
~std/args:count()
| count n |> std/io:print.ln("arg count: {{ n:d }}")
// Get program name (index 0) - just verify we can access it
~std/args:get(index: 0)
| arg _ |> std/io:print.ln("has program name: yes")
| out-of-bounds |> std/io:print.ln("no args?!")
// Get rest (skipping program name)
~std/args:rest()
| args r |> std/io:print.ln("rest count: {{ r.len:d }}")
Actual
arg count: 1
has program name: yes
rest count: 0
Expected output
arg count: 1
has program name: yes
rest count: 0
Flows
flow ~count click a branch to expand · @labels scroll to their anchor
count
flow ~get click a branch to expand · @labels scroll to their anchor
get (index: 0)
flow ~rest click a branch to expand · @labels scroll to their anchor
rest
Test Configuration
MUST_RUN