this repo has no description
1opam-version: "2.0"
2maintainer: "Thomas Gazagnaire <thomas@gazagnaire.org>"
3authors: ["Thomas Gazagnaire <thomas@gazagnaire.org"]
4homepage: "https://github.com/realworldocaml/craml"
5license: "ISC"
6dev-repo: "git+https://github.com/realworldocaml/craml.git"
7bug-reports: "https://github.com/realworldocaml/craml/issues"
8doc: "https://realworldocaml.github.io/craml/"
9
10build: [
11 ["jbuilder" "subst" "-p" name] {dev}
12 ["jbuilder" "build" "-p" name "-j" jobs]
13 ["jbuilder" "runtest" "-p" name] {with-test}
14]
15depends: [
16 "ocaml"
17 "jbuilder" {>= "1.0+beta7"}
18 "fmt" {>= "0.8.5"}
19 "astring"
20 "logs"
21 "cmdliner"
22]
23synopsis: "A CRAM-testing framework for testing command line applications"
24description: """
25CRAM is a is functional testing framework for command line
26applications. `craml` is freely inspired by the [Python
27tool](https://bitheap.org/cram/), which was itself based on
28Mercurial's [unified test
29format](https://www.selenic.com/blog/?p=663).
30
31`craml` is released as a single binary (called `craml`) and
32supports the following syntax:
33
34- Lines beginning with two spaces, a dollar sign, and a space are
35 *commands* and will be run in the shell.
36- Multi-lines commands end by `\\` and continue with two spaces and
37 a `>` sign on the next line:
38 ```
39 $ <line1> \\
40 > <line2> \\
41 > <line3>
42 ```
43- Lines beginning with two spaces are considered command *output*.
44- Command outputs can contains *ellipsis*: `...`. These will
45 match any possible outputs (on zero, one or multiple lines).
46- Lines starting by `<--` are command *pre-conditions*; they will
47 determine the conditions where the command is run. Currently, only
48 non-deterministic modes are supported as pre-conditions (see below).
49- Lines starting by `-->` are command *post-conditions*. Currently,
50 only exit codes are supported as post-conditions (see below).
51- Anything else is a comment. It is not possible to put comments
52 in the middle of an output as it is not clear what should be done
53 to them when the output changes.
54
55To run the tests described in a `<file>`, use `craml <file>`. This will
56run all the commands in sequence and will generated `<file>.corrected`
57if one of the output do not match the expected command outputs.
58
59### Non-deterministic Outputs
60
61`craml` supports non-deterministic outputs:
62
63```
64<-- non-deterministic
65 $ <command>
66 <output>
67```
68
69In that case, `craml <file>` will run the command but will not
70generate `<file>.corrected` if the new output differs from the one
71described in the file. Use `craml --non-deterministic <file>` to come
72back to the default behaviour.
73
74### Non-deterministic Commands
75
76`craml` supports non-deterministic outputs:
77
78```
79<-- non-deterministic [skip]
80 $ <command>
81 <output>
82```"""
83url {
84 src:
85 "https://github.com/realworldocaml/craml/releases/download/1.0.0/craml-1.0.0.tbz"
86 checksum: [
87 "sha256=efe73af16e95683bf38f33b6d011bb9b5ec0c9c2c658820577662408a01fd0ef"
88 "md5=328d4d6bb137054894b215b3e10d95ca"
89 ]
90}