package otf
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=425eed916791b3b0a0a3c874542d7a3a1dc800587767f248d352e37f28acbe05
md5=6e7789f1b5726ffda6f91ffe25271f0e
Description
Added to opam-repository:
README
otf is a simple Output Test Framework.
The goal is to test command lines and check that it produces the correct output (exit code, standard output, standard error output).
Usage examples
The tests and example directories contain several tests.
Once otf is compiled, you can for example run one simple test by using the following command:
% ./otf examples/false
------ examples/false -----------------------------
===================================================
Summary: 1 passed, 0 failed
===================================================To check the configuration of a particular test, you can use the -print-config command:
% ./otf -print-config examples/grep
ARGS: string list = ["foo"] [from "examples/grep.test"]
DIFFOPTIONS: string list = [] [from default configuration]
EXIT_CODE: int = 0 [from default configuration]
PROG: string = "grep" [from "examples/grep.test"]
Config OKotf supports simple collections, with -run-collection on a directory containing tests:
% ./otf -run-collection examples
===================================================
Running collection "examples"
6 tests collected
failing F
false .
grep .
grep2 .
grep3 .
sort .
===================================================
------ examples/failing ---------------------------
Invalid exit code (got 0 while expecting 1)
===================================================
Summary: 5 passed, 1 failed
===================================================Finally, it is possible to factor config elements for multiple tests by placing them in the same directory, and by writing the common config elements in config.otfrc in the directory. There is an example in tests/common-config.
Dev Dependencies
None
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building otf with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.1 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure