module Conf:Define command line options, environment variables and file configuration.sig
..end
This module helps to define configuration options that are translated to command line options et al.
The name defined for the variable is:
type'a
conf_t =string -> 'a -> Arg.doc -> OUnit2.test_ctxt -> 'a
val make_string : string conf_t
make_string name default help
Create a string configuration
option with default value default
and a short help string.
The result of the partial application of the function can be used
inside tests to be evaluated to a value.
let my_option = Conf.make_string "my_option" "the default" "A default option."
let tests =
"ATest" >::
(fun test_ctxt -> let option_value = my_option test_ctxt in ())
val make_string_opt : string option conf_t
string option
configuration option. See !make_string
.val make_int : int conf_t
int
configuration option. See !make_string
.val make_float : float conf_t
float
configuration option. See !make_string
.val make_bool : bool conf_t
bool
configuration option. See !make_string
.val make_exec : string -> OUnit2.test_ctxt -> string
make_exec execname
Create a option to define an executable.