From 30636e7cf345757f95235744ff81376ae81c9aa2 Mon Sep 17 00:00:00 2001 From: mo8it Date: Tue, 16 Apr 2024 21:46:07 +0200 Subject: [PATCH] Use colors inside the test --- src/exercise.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/exercise.rs b/src/exercise.rs index 2ec8d979..8bdf399f 100644 --- a/src/exercise.rs +++ b/src/exercise.rs @@ -69,7 +69,17 @@ impl Exercise { pub fn run(&self) -> Result { match self.mode { Mode::Run => self.cargo_cmd("run", &[]), - Mode::Test => self.cargo_cmd("test", &["--", "--nocapture", "--format", "pretty"]), + Mode::Test => self.cargo_cmd( + "test", + &[ + "--", + "--color", + "always", + "--nocapture", + "--format", + "pretty", + ], + ), Mode::Clippy => self.cargo_cmd( "clippy", &["--", "-D", "warnings", "-D", "clippy::float_cmp"],