radicle-heartwood-lfs/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:
98d884827e/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
..
src radicle-cli-test: Prepare testing with `jj` 2025-09-26 12:03:01 +01:00
Cargo.toml crates: 1.4.0 release 2025-08-27 10:30:28 +01:00
README.md repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00

README.md

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