All dependencies that are dependencies of multiple crates within the workspace were pulled up to the root `Cargo.toml`. Dependencies that are dependencies of just one crate within the workspace remain in the `*/Cargo.toml` of that particular crate. Generally, this helps us keep an overview of dependencies: - If multiple crates depend on a crate, we will see the reference to the workspce. - Otherwise, we will see a line that specifies the version. It is up to the maintainers to recognize when a dependency becomes a dependency of multiple crates in the workspace, at which point it should be moved to the workspace. The tool `cargo-autoinherit` can be used to automatically pull *ALL* dependencies to the workspace. I used this, and in a separate, manual step, filtered out those dependencies that are dependencies of a single crate only, moving those back manually. At the same time, I also unified depending on sibling crates in the workspace. This is now also done via workspace dependencies. See: - https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace - https://github.com/mainmatter/cargo-autoinherit |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
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();
}