package alcotest
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1e29c3b41d4329062105b723dfda3aff86b8cef5e7c7500d0e491fc5fd78e482
sha512=c49d402fa636dcf11f81917610dd1d2eca8606c8919aede4db23710d071f6046a8f93c78de9fbfee26637a53ca67f71fad500bfa2478b7f0f059608a492dd0a5
doc/alcotest.engine/Alcotest_engine/V1/Cli/Make/argument-1-_/index.html
Parameter Make._
Parameters
Signature
time ()
returns the current timestamp, used to measure the duration of a testrun.
Return true
if standard output refers to a terminal or console window, false
otherwise.
stdout_columns ()
is the current width of stdout
in columns, or None
if no width can be determined (e.g. stdout
is not a TTY).
val setup_std_outputs :
?style_renderer:Fmt.style_renderer ->
?utf_8:bool ->
Formatters.stdout ->
Formatters.stderr ->
unit
setup_std_outputs ~style_renderer ~utf_8 stdout stderr
is called at startup of alcotest and sets up the standard streams for colored output.
Whether or not the test runner should trap test logs. The following functions are used iff this is set to true
.
prepare ~root ~uuid ~name
is called before test suite execution.
root
is the directory used for log capturing;uuid
is the unique test execution ID;name
is the suite name.
val open_write_only : string -> file_descriptor
val close : file_descriptor -> unit
val with_redirect : file_descriptor -> (unit -> 'a M.t) -> 'a M.t
with_redirect fd f
is called for each test. On Unix, it deals with redirection of standard streams to the fd
.
val home_directory : unit -> (string, [ `Msg of string ]) result
home_directory ()
is the current user's HOME directory, if it exists.