Opam Package craml.1.0.0

Package info

opam-namecraml
opam-version1.0.0
synopsisA CRAM-testing framework for testing command line applications
description CRAM is a is functional testing framework for command line applications. `craml` is freely inspired by the [Python tool](https://bitheap.org/cram/), which was itself based on Mercurial's [unified test format](https://www.selenic.com/blog/?p=663). `craml` is released as a single binary (called `craml`) and supports the following syntax: - Lines beginning with two spaces, a dollar sign, and a space are *commands* and will be run in the shell. - Multi-lines commands end by `\` and continue with two spaces and a `>` sign on the next line: ``` $ <line1> \ > <line2> \ > <line3> ``` - Lines beginning with two spaces are considered command *output*. - Command outputs can contains *ellipsis*: `...`. These will match any possible outputs (on zero, one or multiple lines). - Lines starting by `<--` are command *pre-conditions*; they will determine the conditions where the command is run. Currently, only non-deterministic modes are supported as pre-conditions (see below). - Lines starting by `-->` are command *post-conditions*. Currently, only exit codes are supported as post-conditions (see below). - Anything else is a comment. It is not possible to put comments in the middle of an output as it is not clear what should be done to them when the output changes. To run the tests described in a `<file>`, use `craml <file>`. This will run all the commands in sequence and will generated `<file>.corrected` if one of the output do not match the expected command outputs. ### Non-deterministic Outputs `craml` supports non-deterministic outputs: ``` <-- non-deterministic $ <command> <output> ``` In that case, `craml <file>` will run the command but will not generate `<file>.corrected` if the new output differs from the one described in the file. Use `craml --non-deterministic <file>` to come back to the default behaviour. ### Non-deterministic Commands `craml` supports non-deterministic outputs: ``` <-- non-deterministic [skip] $ <command> <output> ```
authors
  • Thomas Gazagnaire <thomas@gazagnaire.org
homepagehttps://github.com/realworldocaml/craml
licenseISC
changes-fileCHANGES.md
readme-fileREADME.md
deps (6)
revdeps(0)
metas (1)
libraries (1)

Package modules

Package sources

craml

Package files

lib/craml/s.ml
lib/craml/opam
lib/craml/lexer.ml
lib/craml/craml__S.cmx
lib/craml/craml__S.cmt
lib/craml/craml__S.cmi
lib/craml/craml__Lexer.cmx
lib/craml/craml__Lexer.cmt
lib/craml/craml__Lexer.cmi
lib/craml/craml__Common.cmx
lib/craml/craml__Common.cmt
lib/craml/craml__Common.cmi
lib/craml/craml__.ml-gen
lib/craml/craml__.cmx
lib/craml/craml__.cmt
lib/craml/craml__.cmi
lib/craml/craml.mli
lib/craml/craml.ml
lib/craml/craml.dune
lib/craml/craml.cmxs
lib/craml/craml.cmxa
lib/craml/craml.cmx
lib/craml/craml.cmti
lib/craml/craml.cmt
lib/craml/craml.cmi
lib/craml/craml.cma
lib/craml/craml.a
lib/craml/common.ml
lib/craml/META
lib/craml
doc/craml/README.md
doc/craml/CHANGES.md
doc/craml
bin/craml