rust-script 0.36.0

Command-line tool to run Rust "scripts" which can make use of crates.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[test]
fn test_version() {
    let out = rust_script!("--version").unwrap();
    assert!(out.success());
    scan!(&out.stdout;
        ("rust-script", &::std::env::var("CARGO_PKG_VERSION").unwrap(), .._) => ()
    )
    .unwrap();
}

#[test]
fn test_clear_cache() {
    let out = rust_script!("--clear-cache").unwrap();
    assert!(out.success());
}