cli-test: Complete cargo metadata

Signed-off-by: xla <self@xla.is>
This commit is contained in:
xla 2023-02-16 18:24:36 +11:00 committed by Alexis Sellier
parent 950fae209d
commit feedf345a3
No known key found for this signature in database
3 changed files with 47 additions and 3 deletions

2
Cargo.lock generated
View File

@ -1869,7 +1869,7 @@ dependencies = [
[[package]]
name = "radicle-cli-test"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"log",
"pretty_assertions",

View File

@ -1,9 +1,18 @@
[package]
name = "radicle-cli-test"
license = "MIT OR Apache-2.0"
version = "0.1.0"
authors = ["Alexis Sellier <alexis@radicle.xyz>"]
version = "0.1.1"
authors = [
"Alexis Sellier <alexis@radicle.xyz>",
"xla <self@xla.is>"
]
edition = "2021"
rust-version = "1.67"
repository = "https://github.com/radicle-dev/heartwood"
description = "Test your cli with markdown descriptions"
categories = ["development-tools::testing"]
keywords = ["cli", "test", "command"]
readme = "README.md"
[dependencies]
log = { version = "0.4", features = ["std"] }

View File

@ -0,0 +1,35 @@
# radicle-cli-test
Test your CLI with the help of markdown descriptions.
## Example
Test flows are described in markdown like this example:
````` markdown
# 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:
``` rust
use std::path::Path;
use radicle_cli_test::TestFormula;
#[test]
fn kind_echo() {
TestFormula::new()
.file(Path::new("./kind-echo.md"))
.unwrap()
.run()
.unwrap();
}
```