diff --git a/full-tests/to-empty-main/src/main.rs b/full-tests/to-empty-main/src/main.rs index 7f80c4e..2d13a58 100644 --- a/full-tests/to-empty-main/src/main.rs +++ b/full-tests/to-empty-main/src/main.rs @@ -9,4 +9,5 @@ fn user(mut map: HashMap<(), ()>) { fn main() { let map = HashMap::new(); user(map); + "~REQUIRE-DELETED main-body"; } diff --git a/tests/full_tests.rs b/tests/full_tests.rs index ed28255..b6e6025 100644 --- a/tests/full_tests.rs +++ b/tests/full_tests.rs @@ -16,6 +16,15 @@ use tempfile::TempDir; #[test] #[cfg_attr(not(unix), ignore = "FIXME: Make this not cursed.")] fn full_tests() -> Result<()> { + let exit = Command::new("cargo") + .arg("build") + .spawn() + .context("spawn: cargo build")? + .wait() + .context("wait: cargo build")?; + + ensure!(exit.success(), "cargo build failed"); + let path = Path::new(file!()) .canonicalize()? .parent()