package octez-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of Tezt.Regression

Regression test helpers (run tests, capture output, etc).

val capture : ?eol:bool -> string -> unit

Capture some output of a regression test.

Call this to record a string into the expected output file of the current test. A newline character \n will be added after it if eol is true (which is the default).

This function only records its argument when called while a regression test is running, i.e. from the body of Regression.register. If you call it outside of Regression.register, it has no effect. So you can define a function that captures and use it with or without regression testing.

A typical use is to define custom process hooks that substitute non-deterministic parts of the output with deterministic ones. See also hooks.

Hooks that enable regression testing when attached to a process ran from a registered regression test function.

The hooks will capture the spawned command, its arguments and the output of its execution.

val register : __FILE__:string -> title:string -> tags:string list -> ?uses:Uses.t list -> ?file:string -> (unit -> unit Lwt.t) -> unit

Wrapper over Tezt.Regression.register that checks test dependencies (?uses).

OCaml

Innovation. Community. Security.