radicle-heartwood-lfs/crates/radicle-cli-test
Lorenz Leutgeb 119445ce6c
cli-test: Move `let mut args` closer to its uses
In case a `cd` command is to be processed, no replacement of
environment variables in arguments is performed. This means that the
definition of `let mut args` and the replacement itself can be moved
closer to where `args` is then actually used, which is easier to
reason about.
2026-02-17 20:19:26 +01:00
..
src cli-test: Move `let mut args` closer to its uses 2026-02-17 20:19:26 +01:00
Cargo.toml term, cli: `winsplit` over `shlex` on Windows 2026-02-11 10:26:22 +01:00
README.md chore: Fix spelling errors with codespell 2025-11-01 12:11:02 +01: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 like:

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

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