Skip to content

Instantly share code, notes, and snippets.

@colin-kiegel
colin-kiegel / generic_assertions.rs
Last active March 22, 2017 23:33
thoughts about assert_cli ... :-)
/// Warning: Pseudo-Rust Code
/// Some rough ideas how `assert_cli` could accept arbitrary assertions and possibly
/// support interactive commands.
///
/// The current simple API could be implemented on top of this more general one.
Cmd::run("")
.with_timeout(Duration(...))
.assert(StdOut::ends_with("Are you sure?")) // ::starts_with, ::eq, ::ne, ::contains