radicle-cli-test

Radicle CLI test library

4 releases (2 breaking)

0.10.0 Jun 5, 2024
0.9.0 Mar 26, 2024
0.1.1 Feb 16, 2023
0.1.0 Feb 16, 2023

#224 in Testing

Download history 41/week @ 2024-06-23 2/week @ 2024-06-30 25/week @ 2024-07-07 11/week @ 2024-07-14 23/week @ 2024-08-04 49/week @ 2024-08-11 4/week @ 2024-08-18 11/week @ 2024-08-25 4/week @ 2024-09-01 15/week @ 2024-09-08 48/week @ 2024-09-15 27/week @ 2024-09-22 13/week @ 2024-09-29 2/week @ 2024-10-06

92 downloads per month
Used in 4 crates (via radicle-cli)

MIT/Apache and GPL-3.0-or-later

25KB
564 lines

radicle-cli-test

Test your CLI with the help of markdown descriptions.

Example

Test flows are described in markdown like this example:

# Echoing works

When I call echo, it answers:

```
$ echo "ohai"
ohai
```

Say this is placed in kind-echo.md, this is what the corresponding test case would look lke:

use std::path::Path;
use radicle_cli_test::TestFormula;

#[test]
fn kind_echo() {
    TestFormula::new()
        .file(Path::new("./kind-echo.md"))
        .unwrap()
        .run()
        .unwrap();
}

Dependencies

~34–49MB
~848K SLoC