Interactive_test.Pauser
A Pauser.t
is tool to include optional prompting pauses in test-scenarios.
type t = private {
mutable extra_commands : Console.Prompt.item Internal_pervasives.list;
default_end : [ `Sleep of Internal_pervasives.float ];
}
val make :
?default_end:[ `Sleep of Internal_pervasives.float ] ->
Console.Prompt.item Internal_pervasives.list ->
t
val add_commands :
< pauser : t.. > ->
Console.Prompt.item Internal_pervasives.list ->
Internal_pervasives.unit
Add commands to the current pauser.
val generic :
< application_name : Internal_pervasives.string
; console : Console.t
; pauser : t
; test_interactivity : Interactivity.t.. > ->
?force:Internal_pervasives.bool ->
Easy_format.t Internal_pervasives.list ->
(Internal_pervasives.unit, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
Pause the test according to state#interactivity
(overridden with ~force:true
), the pause displays the list of Easy_format
.ts and prompts the user for commands (see add_commands
).
val run_test :
< application_name : Internal_pervasives.string
; console : Console.t
; paths : Paths.t
; pauser : t
; runner : Running_processes.State.t
; test_interactivity : Interactivity.t
; test_baking : Internal_pervasives.bool.. > ->
(Internal_pervasives.unit ->
(Internal_pervasives.unit,
[> Internal_pervasives.System_error.t ] as 'errors)
Internal_pervasives.Asynchronous_result.t) ->
pp_error:(Stdlib.Format.formatter -> 'errors -> Internal_pervasives.unit) ->
Internal_pervasives.unit ->
(Internal_pervasives.unit,
[> Internal_pervasives.System_error.t | `Die of Internal_pervasives.int ])
Internal_pervasives.Asynchronous_result.t
Run a test-scenario and deal with potential errors according to state#test_interactivity
.