Files
heartwood/crates/radicle-cli-test
Lorenz Leutgeb fd5043d572 radicle-cli-test: Prepare testing with jj
Most of this is taken from Jujutsu's own testing setup, see:
https://github.com/jj-vcs/jj/blob/98d884827e2b9db72d480bb0c3610e51f103b7d4/cli/tests/common/test_environment.rs#L106-L150

Not all features are preserved, but this is good enough.
2025-09-26 12:03:01 +01:00
..
2025-08-27 10:30:28 +01:00

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();
}