package tezt
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
md5=88c2d9d3da75ff554599bc34cbf5acbe
    
    
  sha512=e60294514ecc4a989ce663ebb306e56f654dcfaffb7dbe5e3f05f5a13c9c2ff64dadde4a77b0d9a8567a76a6a7a2b25e0940ccd2a956ffcb85ff9300bfebe3bc
    
    
  doc/tezt.core/Tezt_core/Regression/index.html
Module Tezt_core.RegressionSource
Run Tezt regression tests and capture their output.
NOTE: consider using dune cram when it becomes available: https://dune.readthedocs.io/en/stable/tests.html#cram-tests
val register : 
  __FILE__:string ->
  title:string ->
  tags:string list ->
  ?file:string ->
  (unit -> unit Lwt.t) ->
  unitRegister a regression test.
This function is a wrapper around Test.register. It adds the "regression" tag to the tags list provided by the argument.
Output which is captured (with capture) is recorded in a file named <ROOT>/<DIR>/expected/<BASE>/<FILE>.out where:
- <ROOT>is the root directory of the project, read from environment variable- DUNE_SOURCEROOTif available, else- PWDif available, else using- Sys.getcwd;
- <DIR>is- Filename.dirname __FILE__;
- <BASE>is- Filename.basename __FILE__;
- <FILE>is- ~file, which defaults to a sanitized and possibly truncated version of- ~title.
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.