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/Cli/index.html
Module Tezt_core.CliSource
Command-line interface.
When this module is loaded, it parses command line options unconditionally as a side-effect, using the Clap library.
In general, you probably don't need to use this module to define tests. See "Defining Custom Arguments".
Defining Custom Arguments
Tezt uses the Clap library to define its command-line arguments. Clap.close, which signals the end of command-line argument definitions, is called by Test.run.
This means that you can define your own arguments with Clap before calling Test.run. In general, you should avoid using their values before Clap.close, so you should only use them inside tests (i.e. from functions given to Test.register). There are exceptions to this rule (see the README of Clap).
You should avoid defining unnamed arguments (i.e. arguments that are not prefixed by a dash), because those are already used by Tezt for tags.
Command-line arguments that cause Tezt to do something else than running tests.
Command-line arguments that control the set of tests to run.
Defining Custom Arguments (Deprecated Method)
The functions below are deprecated. Instead, you can define arguments using Clap directly (see "Defining Custom Arguments").
Get the value for a parameter specified with --test-arg.
Usage: get parse parameter
If --test-arg parameter=value was specified on the command-line, this calls parse on value. If parse returns None, this fails. If parse returns Some x, this returns x.
If no value for parameter was specified on the command-line, this returns default if default was specified. Else, this fails.
It is recommended to make it so that specifying parameters with --test-arg is not mandatory for everyday use. This means it is recommended to always give default values, and that those default values should be suitable for typical test runs. For parameters that can take a small number of values, it is usually better to register multiple tests, one for each possible value, and to use tags to select from the command-line.
Same as get parse parameter but return None if parameter is absent.
Same as get bool_of_string_opt.
Same as get_opt bool_of_string_opt.
Same as get int_of_string_opt.
Same as get_opt int_of_string_opt.
Same as get float_of_string_opt.
Same as get_opt float_of_string_opt.
Same as get (fun x -> Some x).
Same as get_opt (fun x -> Some x).