code wiki / _hdl_build / nx_cms_multipart_test.nx

nx_cms_multipart_test.nx

buildroot/runtime/_hdl_build/nx_cms_multipart_test.nx

3093 B55 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_multipart_test.nx -- KAT for the corrected multipart parser. Builds a 2-part body (a text field + a file part with TWO headers and a binary-ish payload), asserts both parts' names, filename, and body bytes are recovered exactly, and that a body with NO closing delimiter is rejected. expect_exit: 0

dependencies 2 imports · 0 importers

nx_cms_multipart.nx nx_syscalls.nx nx_cms_multipart_test.nx

imports: nx_cms_multipart.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap t_cat t_catn cms_mp_parse sys_mmap ↻ cmp_find cms_mp_field t_streq sys_exit

structs

none

consts

none

functions

8func t_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var k: i64=0; while s[k]!=(0 as u8){dst[o]=s[k];o=o+1;k=k+1} return o }
called by 1: main
9func t_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 { var o: i64=off; var k: i64=0; while k<n{dst[o]=s[k];o=o+1;k=k+1} return o }
called by 1: main
10func t_streq(a: *u8, n: i64, b: *u8) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } if b[n]!=(0 as u8) { return 0 } return 1 }
called by 1: main
12func main() -> i64