B0_expectSourceB0 expectation tests.
An expectation test runs a program or sequence of programs in a given environment with given inputs and checks designated outputs against expected outcomes.
B0 expectation tests use your VCS to integrate and correct tests.
See the TODO.
The type for expectation test runners. It represents a context to run a set of expctation tests.
val make :
?vcs:B00_vcs.t ->
?prefix:B0_std.Fpath.t ->
B0_cmdlet.Env.t ->
base:B0_std.Fpath.t ->
(t, string) resultmake env ~base is an expectation test runner in environment env.
vcs is the VCS to use by default looked up with B00_vcs.t in B0_cmdlet.Env.scope_dirprefix prefix is a prefix relative to which relative paths are interpreted and absolute path suffixes highlighed defaults (maybe relativiized in the future) to B0_cmdlet.Env.scope_dir.base is a base directory in which the expectations are located relative to prefix.Note. It's important to have a well defined base in which expectations are VCS controlled so so that users can get easily get summaries and diffs via their VCS without the noise of surrounding changes.
prefix exp is the prefix of exp. See make.
base exp is the absolute base path of exp. See make.
base_files exp ~recurse are the files in base exp and sub directories if recurse is true.
dur exp is the monotonic duration since make.
file_outcome exp f is the expectation test outcome for file f in exp.
log_outcome f o logs the outcome o of file f. At some point we likely want to add f to o. This should be done as soon as possible.
log_results t os logs the result os. dir is the path used to print VCS command for the summary or diff.
Note these do log outcomes.
val stdout :
t ->
?env:B0_std.Os.Env.assignments ->
?cwd:B0_std.Fpath.t ->
stdout:B0_std.Fpath.t ->
B0_std.Cmd.t ->
(Outcome.t, string) result