Add (near) automatic testing for command examples (#1777)

This commit is contained in:
Jason Gedge
2020-05-18 08:56:01 -04:00
committed by GitHub
parent 3fc4a9f142
commit acf13a6fcf
119 changed files with 1935 additions and 282 deletions

View File

@ -272,6 +272,7 @@ impl EvaluatedCommandArgs {
pub struct Example {
pub example: &'static str,
pub description: &'static str,
pub result: Option<Vec<Value>>,
}
pub trait WholeStreamCommand: Send + Sync {
@ -293,8 +294,8 @@ pub trait WholeStreamCommand: Send + Sync {
false
}
fn examples(&self) -> &[Example] {
&[]
fn examples(&self) -> Vec<Example> {
Vec::new()
}
}