Library
Module
Module type
Parameter
Class
Class type
Code blocks.
The type for block values.
type t = {
line : int;
file : string;
section : section option;
labels : (string * ([ `Eq | `Neq | `Le | `Lt | `Ge | `Gt ] * string) option)
list;
header : string option;
contents : string list;
value : value;
}
The type for supported code blocks.
val empty : t
empty
is the empty block.
pp_footer
pretty-prints block footer.
val pp_line_directive : (string * int) Fmt.t
pp_line_directive
pretty-prints a line directive given as a filename and line number.
val mode : t -> [ `Non_det of [ `Command | `Output ] | `Normal ]
mode t
is t
's mode.
val directory : t -> string option
directory t
is the directory where t
tests should be run.
val source_trees : t -> string list
source_trees t
is the list of extra source-trees to add as dependency of the code-block.
val file : t -> string option
file t
is the name of the file to synchronize t
with.
val part : t -> string option
part t
is the part of the file to synchronize t
with. If lines is not specified synchronize the whole file.
val environment : t -> string
environment t
is the name given to the environment where t
tests are run.
val set_variables : t -> (string * string) list
set_variable t
is the list of environment variable to set and their values
val unset_variables : t -> string list
unset_variable t
is the list of environment variable to unset
val required_packages : t -> string list
required_packages t
is the names of the required packages
val skip : t -> bool
skip t
is true iff skip
is in the labels of t
.
val header : t -> string option
header t
is t
's header.
val executable_contents : t -> string list
executable_contents t
is either t
's contents if t
is a raw or a cram block, or t
's commands if t
is a toplevel fragments (e.g. the phrase result is discarded).
val version_enabled : t -> bool
version_supported t
if the current OCaml version complies with t
's version.
eval t
is the same as t
but with it's value replaced by either Cram
or Toplevel
blocks, depending on t
's header.