use docker_command::*;
use std::error::Error;
use std::path::Path;
#[test]
fn test_example() -> Result<(), Box<dyn Error>> {
let output = Launcher::auto()
.ok_or("container comand not found")?
.run(RunOpt {
image: "alpine:latest".into(),
command: Some(Path::new("echo").into()),
args: vec!["hello".into(), "world".into()],
..Default::default()
})
.enable_capture()
.run()?;
assert_eq!(output.stdout_string_lossy(), "hello world\n");
Ok(())
}