Skip to main content

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

§Skip Directives

Tests can be conditionally skipped using %skip directives:

%skip                           # unconditional skip
%skip(not yet implemented)      # unconditional skip with message
%skip if: test "$OS" = "Win"    # conditional skip
%skip(unix only) if: test ...   # conditional skip with message

File-level skips go at the top of the file before any tests. Test-level skips go after the test name, before the closing ===.

Structs§

CorpusFile
SkipDirective
TestCase
VariableDecl

Enums§

ParseError
VarType

Functions§

parse_content
parse_file