Crate cctr_corpus

Crate cctr_corpus 

Source
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 }}s
---
with
* time: number
having
* time > 0
* time < 60

Structs§

TestCase
A single test case parsed from a corpus file.
Variable
A declared variable with name and type.

Enums§

ParseError
Segment
A segment of a template string - either literal text or a placeholder.
VarType
Variable type for pattern matching.

Functions§

parse_content
parse_file
parse_segments