This ports TestAstFunc2 from our home-grown content storage system to the txtar package. Since a single file can be used to represent the entire folder hierarchy, this makes it much easier to see and edit tests.
6 lines
167 B
Plaintext
6 lines
167 B
Plaintext
-- main.mcl --
|
|
$st struct{x str} = struct{x => "hello", x => "world",}
|
|
test structlookup($st, "x") {}
|
|
-- OUTPUT --
|
|
# err: errInit: duplicate struct field name of: `x`
|