cli-test: Complete cargo metadata
Signed-off-by: xla <self@xla.is>
This commit is contained in:
parent
950fae209d
commit
feedf345a3
|
|
@ -1869,7 +1869,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "radicle-cli-test"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"log",
|
||||
"pretty_assertions",
|
||||
|
|
|
|||
|
|
@ -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"] }
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
```
|
||||
Loading…
Reference in New Issue