Skip to main content

crok

Macro crok 

Source
macro_rules! crok {
    ($name:ident, $script:expr) => { ... };
}
Expand description

Generate #[test] functions from inline crok scripts. The PWD for the script is set to the current directory, which for cargo test is the root of the crate.

use crok_lib::crok;

crok!(my_test, r#"
$ echo hello
! hello
"#);