// Features #![feature(must_not_suspend)] // Lints #![expect(clippy::tests_outside_test_module, reason = "We're an integration test")] // Modules mod util; // Imports use { zbuild::ExitResult, zutil_app_error::{Context, app_error}, }; /// Single rule with multiple outputs #[tokio::test] #[tracing_test::traced_test] async fn basic_multiple() -> ExitResult { let temp_dir = util::with_zbuild( r#" rule create_file { out "file1.out"; out "file2.out"; exec "touch" "file1.out"; exec "touch" "file2.out"; } "#, // Note: Only request `file1.out` ["file1.out"], ) .await?; let file1_out = temp_dir.path().join("file1.out"); let file2_out = temp_dir.path().join("file2.out"); for file_out in [file1_out, file2_out] { if !file_out.try_exists().context("Unable to check if output file exists")? { Err(app_error!("Output file {file_out:?} was missing"))?; } } ExitResult::Ok }