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

@ -58,3 +58,15 @@ fn range(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputStream,
Ok(stream.to_output_stream())
}
#[cfg(test)]
mod tests {
use super::Range;
#[test]
fn examples_work_as_expected() {
use crate::examples::test as test_examples;
test_examples(Range {})
}
}