From 403dfbfee8c656f36a2ef4013450e8d5b5e39301 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Sun, 7 Aug 2022 20:01:39 -0700 Subject: [PATCH] Fix tests on Windows The name might be cargo.exe --- tests/cli.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/cli.rs b/tests/cli.rs index 5a3dfee3..654cc696 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -536,8 +536,14 @@ fn small_well_tested_mutants_with_cargo_arg_release() { println!("{}", baseline_log_path.display()); let log_content = fs::read_to_string(&baseline_log_path).unwrap(); println!("{}", log_content); - assert!(log_content.contains("cargo build --tests --release")); - assert!(log_content.contains("cargo test --release")); + regex::Regex::new(r"cargo.* build --tests --release") + .unwrap() + .captures(&log_content) + .unwrap(); + regex::Regex::new(r"cargo.* test --release") + .unwrap() + .captures(&log_content) + .unwrap(); } #[test]