Expand description
Corpus test file parser.
Parses .txt corpus test files into structured test cases using winnow.
§File Format
===
test name
===
command to run
---
expected output
===
test with variables
===
some_command
---
Completed in {{ time: number }}s
---
where
* time > 0
* time < 60Types can be specified inline in placeholders: {{ x }}, {{ x: number }},
{{ x:string }}, {{ x : json object }}. If no type is given, the type is
inferred from the matched value using duck-typing.
Structs§
- Test
Case - A single test case parsed from a corpus file.
- Variable
- A declared variable with name and optional type (None means duck-typed).
Enums§
- Parse
Error - Segment
- A segment of a template string - either literal text or a placeholder.
- VarType
- Variable type for pattern matching.