rustwide 0.24.0

Execute your code on the Rust ecosystem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use rustwide::cmd::Command;
use std::fs;

mod utils;

#[test]
fn run_binary_with_same_name_as_file() -> anyhow::Result<()> {
    let workspace = crate::utils::init_workspace()?;

    let tmpdir = tempfile::tempdir()?;
    std::env::set_current_dir(&tmpdir)?;
    fs::write("true", b"foobar")?;

    Command::new(&workspace, "true").run()?;

    Ok(())
}